@Test public void testGetSharedServiceWhenSdxIsRunning() { SdxClusterResponse sdxClusterResponse = new SdxClusterResponse(); sdxClusterResponse.setName("some-sdx"); sdxClusterResponse.setStatus(SdxClusterStatusResponse.RUNNING); SharedServiceV4Request sdxRequest = underTest.getSharedService(sdxClusterResponse); Assertions.assertEquals("some-sdx", sdxRequest.getDatalakeName()); }
public SharedServiceV4Request getSharedService(SdxClusterResponse sdx) { if (sdx == null) { LOGGER.info("We don't attach the cluster to any Datalake, because the environment has not SDX. So we continue the creation as simple WORKLOAD."); return null; } if (sdx.getStatus() != SdxClusterStatusResponse.RUNNING) { throw new BadRequestException(String.format("Datalake should be running state. Current state is '%s' instead of Running", sdx.getStatus())); } return getSharedServiceV4Request(sdx); }
SdxConverter { public SharedServiceV4Request getSharedService(SdxClusterResponse sdx) { if (sdx == null) { LOGGER.info("We don't attach the cluster to any Datalake, because the environment has not SDX. So we continue the creation as simple WORKLOAD."); return null; } if (sdx.getStatus() != SdxClusterStatusResponse.RUNNING) { throw new BadRequestException(String.format("Datalake should be running state. Current state is '%s' instead of Running", sdx.getStatus())); } return getSharedServiceV4Request(sdx); } }
SdxConverter { public SharedServiceV4Request getSharedService(SdxClusterResponse sdx) { if (sdx == null) { LOGGER.info("We don't attach the cluster to any Datalake, because the environment has not SDX. So we continue the creation as simple WORKLOAD."); return null; } if (sdx.getStatus() != SdxClusterStatusResponse.RUNNING) { throw new BadRequestException(String.format("Datalake should be running state. Current state is '%s' instead of Running", sdx.getStatus())); } return getSharedServiceV4Request(sdx); }  }
SdxConverter { public SharedServiceV4Request getSharedService(SdxClusterResponse sdx) { if (sdx == null) { LOGGER.info("We don't attach the cluster to any Datalake, because the environment has not SDX. So we continue the creation as simple WORKLOAD."); return null; } if (sdx.getStatus() != SdxClusterStatusResponse.RUNNING) { throw new BadRequestException(String.format("Datalake should be running state. Current state is '%s' instead of Running", sdx.getStatus())); } return getSharedServiceV4Request(sdx); }  SharedServiceV4Request getSharedService(SdxClusterResponse sdx); SdxV1Request getSdx(SharedServiceV4Request sharedServiceV4Request); SharedServiceV4Request getSharedServiceV4Request(SdxClusterResponse sdx); }
SdxConverter { public SharedServiceV4Request getSharedService(SdxClusterResponse sdx) { if (sdx == null) { LOGGER.info("We don't attach the cluster to any Datalake, because the environment has not SDX. So we continue the creation as simple WORKLOAD."); return null; } if (sdx.getStatus() != SdxClusterStatusResponse.RUNNING) { throw new BadRequestException(String.format("Datalake should be running state. Current state is '%s' instead of Running", sdx.getStatus())); } return getSharedServiceV4Request(sdx); }  SharedServiceV4Request getSharedService(SdxClusterResponse sdx); SdxV1Request getSdx(SharedServiceV4Request sharedServiceV4Request); SharedServiceV4Request getSharedServiceV4Request(SdxClusterResponse sdx);  }