@Test
public void testDiagnoseInstance() throws Exception {

	String path = InstanceHelpers.computeInstancePath( this.app.getWar());
	ManagedApplication ma = new ManagedApplication( this.app );
	this.managerWrapper.addManagedApplication( ma );
	Response resp = this.resource.diagnoseInstance( "inexisting", path );
	Assert.assertEquals( Status.NOT_FOUND.getStatusCode(), resp.getStatus());
	resp = this.resource.diagnoseInstance( this.app.getName(), "/inexisting" );
	Assert.assertEquals( Status.NOT_FOUND.getStatusCode(), resp.getStatus());
	resp = this.resource.diagnoseInstance( this.app.getName(), path );
	Assert.assertEquals( Status.OK.getStatusCode(), resp.getStatus());
	Diagnostic diag = (Diagnostic) resp.getEntity();
	Assert.assertNotNull( diag );
	Assert.assertEquals( path, diag.getInstancePath());
	Assert.assertEquals( 1, diag.getDependenciesInformation().size());
}