@Test
public void testUnreachableFile() throws Exception {

	// Valid project
	File dir = this.folder.newFolder();
	Assert.assertTrue( new File( dir, Constants.PROJECT_DIR_DESC ).mkdir());
	Assert.assertTrue( new File( dir, Constants.PROJECT_DIR_GRAPH ).mkdir());
	Assert.assertTrue( new File( dir, Constants.PROJECT_DIR_INSTANCES ).mkdir());
	Assert.assertTrue( new File( dir, Constants.PROJECT_DIR_GRAPH + "/VM" ).mkdir());
	Utils.writeStringInto(
			"id: tid\nhandler: test\nname: n",
			new File( dir, Constants.PROJECT_DIR_GRAPH + "/VM/target.properties" ));
	ApplicationTemplateDescriptor desc = new ApplicationTemplateDescriptor();
	desc.setName( "app name" );
	desc.setVersion( "3.0" );
	desc.setGraphEntryPoint( "app.graph" );
	desc.setDslId( "roboconf-1.0" );
	ApplicationTemplateDescriptor.save( new File( dir, Constants.PROJECT_DIR_DESC + "/" + Constants.PROJECT_FILE_DESCRIPTOR ), desc );
	File graphFile = new File( dir, Constants.PROJECT_DIR_GRAPH + "/app.graph" );
	Utils.writeStringInto( "VM {\ninstaller:target;\n}", graphFile );
	// Unreachable files
	final int length = 3;
	File[] copies = new File[ length ];
	for( int i=0; i<length; i++ ) {
		copies[ i ] = new File( new File( dir, Constants.PROJECT_DIR_GRAPH ), "not-used-" + i + ".graph" );
		Utils.copyStream( graphFile, copies[ i ]);
	}
	// Verify
	List<RoboconfError> errors = new ArrayList<>( RuntimeModelIo.loadApplication( dir ).loadErrors );
	Assert.assertEquals( length, errors.size());
	for( int i=0; i<length; i++ ) {
		Assert.assertEquals( ParsingError.class, errors.get( i ).getClass());
		Assert.assertEquals( ErrorCode.PROJ_UNREACHABLE_FILE, errors.get( i ).getErrorCode());
		Assert.assertEquals( copies[ i ], ((ParsingError) errors.get( i )).getFile());
	}
}