@Test
public void testComplexInstances() throws Exception {

	File f = TestUtils.findTestFile( "/configurations/valid/complex-instances.instances" );
	FileDefinition def = ParsingModelIo.readConfigurationFile( f, true );
	Assert.assertEquals( 0, def.getParsingErrors().size());
	List<AbstractBlock> toProcess = new ArrayList<> ();
	toProcess.addAll( def.getBlocks());
	List<BlockInstanceOf> instances = new ArrayList<> ();
	while( ! toProcess.isEmpty()) {
		AbstractBlock currentBlock = toProcess.remove( 0 );
		if( currentBlock.getInstructionType() == AbstractBlock.INSTANCEOF ) {
			BlockInstanceOf blockInstanceOf = (BlockInstanceOf) currentBlock;
			instances.add( blockInstanceOf );
			toProcess.addAll( blockInstanceOf.getInnerBlocks());
		}
	}
	// Keep a list instead of a count, so that we can read the
	// list content at debug time.
	Assert.assertEquals( 8, instances.size());
}