ApplicationInstance extends InstallableInstance { public ApplicationInstance() { } ApplicationInstance();  ApplicationInstance(ApplicationRelease applicationRelease, EnvironmentInstance environmentInstance);  ApplicationInstance(ApplicationRelease applicationRelease, EnvironmentInstance environmentInstance,
                               String vdc);  ApplicationInstance(ApplicationRelease applicationRelease, EnvironmentInstance environmentInstance,
                               String vdc, Status status); ApplicationRelease getApplicationRelease(); EnvironmentInstance getEnvironmentInstance(); void setApplicationRelease(ApplicationRelease applicationRelease); void setEnvironmentInstance(EnvironmentInstance environmentInstance); String toString(); static final String VDC_FIELD; static final String APP_FIELD; }
@Test public void testApplicationInstance() throws Exception { ProductRelease productRelease = new ProductRelease(PRODUCT_NAME, PRODUCT_VERSION); Artifact artifactDto = new Artifact(ARTIFACT_NAME, ARTIFACT_PATH, productRelease); ArrayList<Artifact> artifacts = new ArrayList<Artifact>(); artifacts.add(artifactDto); ApplicationRelease applicationRelease = new ApplicationRelease(APP_NAME, APP_VERSION); applicationRelease.setArtifacts(artifacts); EnvironmentInstance environmentInstance = new EnvironmentInstance(); environmentInstance.setBlueprintName("blueprintName"); ApplicationInstance applicationInstance = new ApplicationInstance(applicationRelease, environmentInstance); assertEquals(applicationInstance.getName(), APP_NAME + "-" + "blueprintName"); assertEquals(applicationInstance.getApplicationRelease().getVersion(), APP_VERSION); }