ApplicationTestUtils.destroyIfMoreThan(2, domain);
long startTime = System.currentTimeMillis();
IApplication application = domain.createApplication(ApplicationTestUtils.createRandomApplicationName(), LatestVersionOf.php().get(user));
// operation
boolean successfull = application.waitForAccessible(WAIT_TIMEOUT);
if (successfull) {
assertTrue(System.currentTimeMillis() <= startTime + WAIT_TIMEOUT);
} else {
assertTrue(System.currentTimeMillis() >= startTime + WAIT_TIMEOUT);