@Test public void describeEnvironmentSuccess() throws Exception { when(environmentRepository.getEnvironment(environmentId)).thenReturn(environment); final DescribeEnvironmentResponse describeEnvironmentResponse = describeEnvironmentApi.describeEnvironment(describeEnvironmentRequest); verify(environmentRepository).getEnvironment(environmentId); assertEquals( describeEnvironmentResponse.getEnvironment().getEnvironmentId(), environmentIdWrapper); assertEquals( describeEnvironmentResponse.getEnvironment().getEnvironmentHealth(), environment.getEnvironmentHealth().name()); assertEquals( describeEnvironmentResponse.getEnvironment().getActiveEnvironmentRevisionId(), environment.getActiveEnvironmentRevisionId()); assertEquals( describeEnvironmentResponse.getEnvironment().getCreatedTime(), environment.getCreatedTime()); assertEquals( describeEnvironmentResponse.getEnvironment().getEnvironmentStatus(), environment.getEnvironmentStatus().name()); assertEquals(describeEnvironmentResponse.getEnvironment().getRole(), environment.getRole()); assertEquals( describeEnvironmentResponse.getEnvironment().getDeploymentConfiguration(), apiModelMapper.toWrapperDeploymentConfiguration(environment.getDeploymentConfiguration())); assertEquals( describeEnvironmentResponse.getEnvironment().getEnvironmentType().name(), environment.getEnvironmentType().name()); assertEquals( describeEnvironmentResponse.getEnvironment().getLastUpdatedTime(), environment.getLastUpdatedTime()); }
public DescribeEnvironmentResponse describeEnvironment( @NonNull final DescribeEnvironmentRequest describeEnvironmentRequest) throws ResourceNotFoundException, InternalServiceException { final com.amazonaws.blox.dataservicemodel.v1.model.EnvironmentId environmentIdFromRequest = describeEnvironmentRequest.getEnvironmentId(); final EnvironmentId environmentId = apiModelMapper.toModelEnvironmentId(environmentIdFromRequest); try { final Environment environment = environmentRepository.getEnvironment(environmentId); return DescribeEnvironmentResponse.builder() .environment(apiModelMapper.toWrapperEnvironment(environment)) .build(); } catch (final ResourceNotFoundException | InternalServiceException e) { log.error(e.getMessage(), e); throw e; } catch (final Exception e) { log.error(e.getMessage(), e); throw new InternalServiceException(e.getMessage(), e); } }
DescribeEnvironmentApi { public DescribeEnvironmentResponse describeEnvironment( @NonNull final DescribeEnvironmentRequest describeEnvironmentRequest) throws ResourceNotFoundException, InternalServiceException { final com.amazonaws.blox.dataservicemodel.v1.model.EnvironmentId environmentIdFromRequest = describeEnvironmentRequest.getEnvironmentId(); final EnvironmentId environmentId = apiModelMapper.toModelEnvironmentId(environmentIdFromRequest); try { final Environment environment = environmentRepository.getEnvironment(environmentId); return DescribeEnvironmentResponse.builder() .environment(apiModelMapper.toWrapperEnvironment(environment)) .build(); } catch (final ResourceNotFoundException | InternalServiceException e) { log.error(e.getMessage(), e); throw e; } catch (final Exception e) { log.error(e.getMessage(), e); throw new InternalServiceException(e.getMessage(), e); } } }
DescribeEnvironmentApi { public DescribeEnvironmentResponse describeEnvironment( @NonNull final DescribeEnvironmentRequest describeEnvironmentRequest) throws ResourceNotFoundException, InternalServiceException { final com.amazonaws.blox.dataservicemodel.v1.model.EnvironmentId environmentIdFromRequest = describeEnvironmentRequest.getEnvironmentId(); final EnvironmentId environmentId = apiModelMapper.toModelEnvironmentId(environmentIdFromRequest); try { final Environment environment = environmentRepository.getEnvironment(environmentId); return DescribeEnvironmentResponse.builder() .environment(apiModelMapper.toWrapperEnvironment(environment)) .build(); } catch (final ResourceNotFoundException | InternalServiceException e) { log.error(e.getMessage(), e); throw e; } catch (final Exception e) { log.error(e.getMessage(), e); throw new InternalServiceException(e.getMessage(), e); } }  }
DescribeEnvironmentApi { public DescribeEnvironmentResponse describeEnvironment( @NonNull final DescribeEnvironmentRequest describeEnvironmentRequest) throws ResourceNotFoundException, InternalServiceException { final com.amazonaws.blox.dataservicemodel.v1.model.EnvironmentId environmentIdFromRequest = describeEnvironmentRequest.getEnvironmentId(); final EnvironmentId environmentId = apiModelMapper.toModelEnvironmentId(environmentIdFromRequest); try { final Environment environment = environmentRepository.getEnvironment(environmentId); return DescribeEnvironmentResponse.builder() .environment(apiModelMapper.toWrapperEnvironment(environment)) .build(); } catch (final ResourceNotFoundException | InternalServiceException e) { log.error(e.getMessage(), e); throw e; } catch (final Exception e) { log.error(e.getMessage(), e); throw new InternalServiceException(e.getMessage(), e); } }  DescribeEnvironmentResponse describeEnvironment(
      @NonNull final DescribeEnvironmentRequest describeEnvironmentRequest); }
DescribeEnvironmentApi { public DescribeEnvironmentResponse describeEnvironment( @NonNull final DescribeEnvironmentRequest describeEnvironmentRequest) throws ResourceNotFoundException, InternalServiceException { final com.amazonaws.blox.dataservicemodel.v1.model.EnvironmentId environmentIdFromRequest = describeEnvironmentRequest.getEnvironmentId(); final EnvironmentId environmentId = apiModelMapper.toModelEnvironmentId(environmentIdFromRequest); try { final Environment environment = environmentRepository.getEnvironment(environmentId); return DescribeEnvironmentResponse.builder() .environment(apiModelMapper.toWrapperEnvironment(environment)) .build(); } catch (final ResourceNotFoundException | InternalServiceException e) { log.error(e.getMessage(), e); throw e; } catch (final Exception e) { log.error(e.getMessage(), e); throw new InternalServiceException(e.getMessage(), e); } }  DescribeEnvironmentResponse describeEnvironment(
      @NonNull final DescribeEnvironmentRequest describeEnvironmentRequest);  }