@Test
public void testUnreachableComponent() throws Exception {

	File f = TestUtils.findTestFile( "/configurations/invalid/facet-without-component.graph" );
	FromGraphDefinition fromDef = new FromGraphDefinition( f.getParentFile());
	Graphs g = fromDef.buildGraphs( f );
	Assert.assertEquals( 0, fromDef.getErrors().size());
	List<ModelError> errors = new ArrayList<>( RuntimeModelValidator.validate( g ));
	Assert.assertEquals( 3, errors.size());
	Assert.assertEquals( ErrorCode.RM_ROOT_INSTALLER_MUST_BE_TARGET, errors.get( 0 ).getErrorCode());
	Assert.assertEquals( new Component( "t" ), errors.get( 0 ).getModelObject());
	Assert.assertEquals( ErrorCode.RM_ORPHAN_FACET_WITH_CHILDREN, errors.get( 1 ).getErrorCode());
	Assert.assertEquals( new Facet( "f" ), errors.get( 1 ).getModelObject());
	Assert.assertEquals( ErrorCode.RM_UNREACHABLE_COMPONENT, errors.get( 2 ).getErrorCode());
	Assert.assertEquals( new Component( "t" ), errors.get( 2 ).getModelObject());
}