@Test
public void testLoadApplication_KarafJoramJndi() throws Exception {

	File directory = TestUtils.findTestFile( "/applications/karaf-joram-jndi" );
	ApplicationLoadResult result = RuntimeModelIo.loadApplication( directory );
	Assert.assertNotNull( result );
	Assert.assertNotNull( result.applicationTemplate );
	Assert.assertEquals( 6, result.loadErrors.size());
	for( RoboconfError error : result.loadErrors )
		Assert.assertEquals( ErrorCode.PROJ_NO_RESOURCE_DIRECTORY, error.getErrorCode());
	Assert.assertNotNull( InstanceHelpers.findInstanceByPath( result.getApplicationTemplate(), "/vmec2karaf" ));
	Assert.assertNotNull( InstanceHelpers.findInstanceByPath( result.getApplicationTemplate(), "/vmec2karaf/karafec21" ));
	Assert.assertNotNull( InstanceHelpers.findInstanceByPath( result.getApplicationTemplate(), "/vmec2karaf/karafec21/jndiec2" ));
	Assert.assertNotNull( InstanceHelpers.findInstanceByPath( result.getApplicationTemplate(), "/vmec2karaf/karafec22" ));
	Assert.assertNotNull( InstanceHelpers.findInstanceByPath( result.getApplicationTemplate(), "/vmec2karaf/karafec22/joramec2" ));
}