for (int i = 0; i < 100 && app.getRunningInstances() < 1; i++) {
Thread.sleep(1000);
app = connectedClient.getApplication(appName);
}
assertEquals(1, app.getRunningInstances());
RestUtil restUtil = new RestUtil();
RestTemplate rest = restUtil.createRestTemplate(httpProxyConfiguration, false);
String results = rest.getForObject("http://" + app.getUris().get(0), String.class);
assertTrue(results.contains("Hello world!"));
}