@Test void detectSingularDeployedAppNullDeployedMta() { tester.test(() -> applicationColorDetector.detectSingularDeployedApplicationColor(null), new Expectation(null)); }
public ApplicationColor detectSingularDeployedApplicationColor(DeployedMta deployedMta) { if (deployedMta == null) { return null; } ApplicationColor deployedApplicationColor = null; for (DeployedMtaApplication deployedMtaApplication : deployedMta.getApplications()) { ApplicationColor applicationColor = CloudModelBuilderUtil.getApplicationColor(deployedMtaApplication); if (deployedApplicationColor == null) { deployedApplicationColor = (applicationColor); } if (deployedApplicationColor != applicationColor) { throw new ConflictException(Messages.CONFLICTING_APP_COLORS, deployedMta.getMetadata() .getId()); } } return deployedApplicationColor; }
ApplicationColorDetector { public ApplicationColor detectSingularDeployedApplicationColor(DeployedMta deployedMta) { if (deployedMta == null) { return null; } ApplicationColor deployedApplicationColor = null; for (DeployedMtaApplication deployedMtaApplication : deployedMta.getApplications()) { ApplicationColor applicationColor = CloudModelBuilderUtil.getApplicationColor(deployedMtaApplication); if (deployedApplicationColor == null) { deployedApplicationColor = (applicationColor); } if (deployedApplicationColor != applicationColor) { throw new ConflictException(Messages.CONFLICTING_APP_COLORS, deployedMta.getMetadata() .getId()); } } return deployedApplicationColor; } }
ApplicationColorDetector { public ApplicationColor detectSingularDeployedApplicationColor(DeployedMta deployedMta) { if (deployedMta == null) { return null; } ApplicationColor deployedApplicationColor = null; for (DeployedMtaApplication deployedMtaApplication : deployedMta.getApplications()) { ApplicationColor applicationColor = CloudModelBuilderUtil.getApplicationColor(deployedMtaApplication); if (deployedApplicationColor == null) { deployedApplicationColor = (applicationColor); } if (deployedApplicationColor != applicationColor) { throw new ConflictException(Messages.CONFLICTING_APP_COLORS, deployedMta.getMetadata() .getId()); } } return deployedApplicationColor; }  }
ApplicationColorDetector { public ApplicationColor detectSingularDeployedApplicationColor(DeployedMta deployedMta) { if (deployedMta == null) { return null; } ApplicationColor deployedApplicationColor = null; for (DeployedMtaApplication deployedMtaApplication : deployedMta.getApplications()) { ApplicationColor applicationColor = CloudModelBuilderUtil.getApplicationColor(deployedMtaApplication); if (deployedApplicationColor == null) { deployedApplicationColor = (applicationColor); } if (deployedApplicationColor != applicationColor) { throw new ConflictException(Messages.CONFLICTING_APP_COLORS, deployedMta.getMetadata() .getId()); } } return deployedApplicationColor; }  ApplicationColor detectLiveApplicationColor(DeployedMta deployedMta, String correlationId); ApplicationColor detectSingularDeployedApplicationColor(DeployedMta deployedMta); }
ApplicationColorDetector { public ApplicationColor detectSingularDeployedApplicationColor(DeployedMta deployedMta) { if (deployedMta == null) { return null; } ApplicationColor deployedApplicationColor = null; for (DeployedMtaApplication deployedMtaApplication : deployedMta.getApplications()) { ApplicationColor applicationColor = CloudModelBuilderUtil.getApplicationColor(deployedMtaApplication); if (deployedApplicationColor == null) { deployedApplicationColor = (applicationColor); } if (deployedApplicationColor != applicationColor) { throw new ConflictException(Messages.CONFLICTING_APP_COLORS, deployedMta.getMetadata() .getId()); } } return deployedApplicationColor; }  ApplicationColor detectLiveApplicationColor(DeployedMta deployedMta, String correlationId); ApplicationColor detectSingularDeployedApplicationColor(DeployedMta deployedMta);  }