@Test
public void testCycleInFacet() throws Exception {

	File f = TestUtils.findTestFile( "/configurations/invalid/cycle-in-facet.graph" );
	FromGraphDefinition fromDef = new FromGraphDefinition( f.getParentFile());
	Graphs graphs = fromDef.buildGraphs( f );
	Assert.assertEquals( 0, fromDef.getErrors().size());
	Collection<ModelError> errors = RuntimeModelValidator.validate( graphs );
	Assert.assertEquals( 5, errors.size());
	RoboconfErrorHelpers.filterErrorsForRecipes( errors );
	Assert.assertEquals( 3, errors.size());
	for( ModelError error : errors ) {
		Assert.assertEquals( ErrorCode.RM_CYCLE_IN_FACETS_INHERITANCE, error.getErrorCode());
		Assert.assertEquals( 1, error.getDetails().length );
	}
}