@Test
public void testLoadApplication_Mongo() throws Exception {

	File directory = TestUtils.findTestFile( "/applications/mongo" );
	ApplicationLoadResult result = RuntimeModelIo.loadApplication( directory );
	Assert.assertNotNull( result );
	Assert.assertNotNull( result.applicationTemplate );
	Assert.assertEquals( 0, result.applicationTemplate.externalExports.size());
	Assert.assertEquals( 2, result.loadErrors.size());
	for( RoboconfError error : result.loadErrors )
		Assert.assertEquals( ErrorCode.PROJ_NO_RESOURCE_DIRECTORY, error.getErrorCode());
	Assert.assertEquals( "Mongo", result.applicationTemplate.getName());
	Assert.assertNotNull( result.applicationTemplate.getGraphs());
	Graphs g = result.applicationTemplate.getGraphs();
	Assert.assertEquals( 1, g.getRootComponents().size());
	Component vmComponent = g.getRootComponents().iterator().next();
	Assert.assertEquals( "VM", vmComponent.getName());
	Assert.assertEquals( "target", vmComponent.getInstallerName());
	Assert.assertEquals( 0, vmComponent.getFacets().size());
	Collection<Component> children = ComponentHelpers.findAllChildren( vmComponent );
	Assert.assertEquals( 1, children.size());
	Component childComponent = children.iterator().next();
	Assert.assertEquals( "puppet", childComponent.getInstallerName());
	Assert.assertEquals( 0, childComponent.getChildren().size());
	Assert.assertEquals( 2, childComponent.exportedVariables.size());
	Assert.assertNull( childComponent.exportedVariables.get( "Mongo.ip" ));
	Assert.assertEquals( "27017", ComponentHelpers.findAllExportedVariables( childComponent ).get( "Mongo.port" ));
	Assert.assertEquals( 2, childComponent.importedVariables.size());
	Assert.assertTrue( childComponent.importedVariables.containsKey( "Mongo.ip" ));
	Assert.assertTrue( childComponent.importedVariables.containsKey( "Mongo.port" ));
}