@Test public void sdxClusterWithoutDatabaseCrnIsNotSupported() { when(sdxCluster.hasExternalDatabase()).thenReturn(true); when(sdxCluster.getDatabaseCrn()).thenReturn(null); assertFalse(victim.isDatabasePauseSupported(sdxCluster)); verifyZeroInteractions(environmentClientService); }
public boolean isDatabasePauseSupported(SdxCluster sdxCluster) { if (sdxCluster.hasExternalDatabase() && Strings.isNotEmpty(sdxCluster.getDatabaseCrn())) { DetailedEnvironmentResponse environment = environmentClientService.getByCrn(sdxCluster.getEnvCrn()); return platformConfig.isExternalDatabasePauseSupportedFor(CloudPlatform.valueOf(environment.getCloudPlatform())); } return false; }
DatabasePauseSupportService { public boolean isDatabasePauseSupported(SdxCluster sdxCluster) { if (sdxCluster.hasExternalDatabase() && Strings.isNotEmpty(sdxCluster.getDatabaseCrn())) { DetailedEnvironmentResponse environment = environmentClientService.getByCrn(sdxCluster.getEnvCrn()); return platformConfig.isExternalDatabasePauseSupportedFor(CloudPlatform.valueOf(environment.getCloudPlatform())); } return false; } }
DatabasePauseSupportService { public boolean isDatabasePauseSupported(SdxCluster sdxCluster) { if (sdxCluster.hasExternalDatabase() && Strings.isNotEmpty(sdxCluster.getDatabaseCrn())) { DetailedEnvironmentResponse environment = environmentClientService.getByCrn(sdxCluster.getEnvCrn()); return platformConfig.isExternalDatabasePauseSupportedFor(CloudPlatform.valueOf(environment.getCloudPlatform())); } return false; }  }
DatabasePauseSupportService { public boolean isDatabasePauseSupported(SdxCluster sdxCluster) { if (sdxCluster.hasExternalDatabase() && Strings.isNotEmpty(sdxCluster.getDatabaseCrn())) { DetailedEnvironmentResponse environment = environmentClientService.getByCrn(sdxCluster.getEnvCrn()); return platformConfig.isExternalDatabasePauseSupportedFor(CloudPlatform.valueOf(environment.getCloudPlatform())); } return false; }  boolean isDatabasePauseSupported(SdxCluster sdxCluster); }
DatabasePauseSupportService { public boolean isDatabasePauseSupported(SdxCluster sdxCluster) { if (sdxCluster.hasExternalDatabase() && Strings.isNotEmpty(sdxCluster.getDatabaseCrn())) { DetailedEnvironmentResponse environment = environmentClientService.getByCrn(sdxCluster.getEnvCrn()); return platformConfig.isExternalDatabasePauseSupportedFor(CloudPlatform.valueOf(environment.getCloudPlatform())); } return false; }  boolean isDatabasePauseSupported(SdxCluster sdxCluster);  }