@Test
public void shouldHaveUrlInEmbeddedRockMongo()
throws OpenShiftException, URISyntaxException, FileNotFoundException, IOException {
// pre-conditions
IApplication jbossAs = ApplicationTestUtils.getOrCreateApplication(domain);
jbossAs = ApplicationTestUtils.destroyAndRecreateIfScalable(jbossAs);
EmbeddedCartridgeTestUtils.silentlyDestroyAllEmbeddedCartridges(jbossAs);
assertThat(new ApplicationAssert(jbossAs)
.hasNotEmbeddableCartridges(LatestVersionOf.mongoDB())
.hasNotEmbeddableCartridges(LatestVersionOf.rockMongo()));
// operation
jbossAs.addEmbeddableCartridge(LatestVersionOf.mongoDB().get(user));
jbossAs.addEmbeddableCartridge(LatestVersionOf.rockMongo().get(user));
// verification
IEmbeddableCartridge rockMongo = LatestVersionOf.rockMongo().get(user);
new EmbeddedCartridgeAssert(jbossAs.getEmbeddedCartridge(rockMongo))
.hasUrlProperty();
// verify using user instance that's not the one used to create
IUser user2 = new TestConnectionBuilder().defaultCredentials().disableSSLCertificateChecks().create().getUser();
IApplication user2Application = user2.getDefaultDomain().getApplicationByName(jbossAs.getName());
assertThat(new ApplicationAssert(user2Application)).hasEmbeddedCartridges(
LatestVersionOf.mongoDB(), LatestVersionOf.rockMongo());
new EmbeddedCartridgeAssert(user2Application.getEmbeddedCartridge(rockMongo))
.hasUrlProperty();
}