@Test(expected = InternalServiceException.class) public void describeEnvironmentRevisionUnknownException() throws Exception { when(environmentRepository.getEnvironmentRevision(isA(EnvironmentId.class), isA(String.class))) .thenThrow(new IllegalStateException("")); describeEnvironmentRevisionApi.describeEnvironmentRevision(describeEnvironmentRevisionRequest); }
public DescribeEnvironmentRevisionResponse describeEnvironmentRevision( @NonNull final DescribeEnvironmentRevisionRequest describeEnvironmentRevisionRequest) throws ResourceNotFoundException, InternalServiceException { final com.amazonaws.blox.dataservicemodel.v1.model.EnvironmentId environmentIdFromRequest = describeEnvironmentRevisionRequest.getEnvironmentId(); final EnvironmentId environmentId = apiModelMapper.toModelEnvironmentId(environmentIdFromRequest); final String environmentRevisionId = describeEnvironmentRevisionRequest.getEnvironmentRevisionId(); try { final EnvironmentRevision environmentRevision = environmentRepository.getEnvironmentRevision(environmentId, environmentRevisionId); return DescribeEnvironmentRevisionResponse.builder() .environmentRevision(apiModelMapper.toWrapperEnvironmentRevision(environmentRevision)) .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); } }
DescribeEnvironmentRevisionApi { public DescribeEnvironmentRevisionResponse describeEnvironmentRevision( @NonNull final DescribeEnvironmentRevisionRequest describeEnvironmentRevisionRequest) throws ResourceNotFoundException, InternalServiceException { final com.amazonaws.blox.dataservicemodel.v1.model.EnvironmentId environmentIdFromRequest = describeEnvironmentRevisionRequest.getEnvironmentId(); final EnvironmentId environmentId = apiModelMapper.toModelEnvironmentId(environmentIdFromRequest); final String environmentRevisionId = describeEnvironmentRevisionRequest.getEnvironmentRevisionId(); try { final EnvironmentRevision environmentRevision = environmentRepository.getEnvironmentRevision(environmentId, environmentRevisionId); return DescribeEnvironmentRevisionResponse.builder() .environmentRevision(apiModelMapper.toWrapperEnvironmentRevision(environmentRevision)) .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); } } }
DescribeEnvironmentRevisionApi { public DescribeEnvironmentRevisionResponse describeEnvironmentRevision( @NonNull final DescribeEnvironmentRevisionRequest describeEnvironmentRevisionRequest) throws ResourceNotFoundException, InternalServiceException { final com.amazonaws.blox.dataservicemodel.v1.model.EnvironmentId environmentIdFromRequest = describeEnvironmentRevisionRequest.getEnvironmentId(); final EnvironmentId environmentId = apiModelMapper.toModelEnvironmentId(environmentIdFromRequest); final String environmentRevisionId = describeEnvironmentRevisionRequest.getEnvironmentRevisionId(); try { final EnvironmentRevision environmentRevision = environmentRepository.getEnvironmentRevision(environmentId, environmentRevisionId); return DescribeEnvironmentRevisionResponse.builder() .environmentRevision(apiModelMapper.toWrapperEnvironmentRevision(environmentRevision)) .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); } }  }
DescribeEnvironmentRevisionApi { public DescribeEnvironmentRevisionResponse describeEnvironmentRevision( @NonNull final DescribeEnvironmentRevisionRequest describeEnvironmentRevisionRequest) throws ResourceNotFoundException, InternalServiceException { final com.amazonaws.blox.dataservicemodel.v1.model.EnvironmentId environmentIdFromRequest = describeEnvironmentRevisionRequest.getEnvironmentId(); final EnvironmentId environmentId = apiModelMapper.toModelEnvironmentId(environmentIdFromRequest); final String environmentRevisionId = describeEnvironmentRevisionRequest.getEnvironmentRevisionId(); try { final EnvironmentRevision environmentRevision = environmentRepository.getEnvironmentRevision(environmentId, environmentRevisionId); return DescribeEnvironmentRevisionResponse.builder() .environmentRevision(apiModelMapper.toWrapperEnvironmentRevision(environmentRevision)) .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); } }  DescribeEnvironmentRevisionResponse describeEnvironmentRevision(
      @NonNull final DescribeEnvironmentRevisionRequest describeEnvironmentRevisionRequest); }
DescribeEnvironmentRevisionApi { public DescribeEnvironmentRevisionResponse describeEnvironmentRevision( @NonNull final DescribeEnvironmentRevisionRequest describeEnvironmentRevisionRequest) throws ResourceNotFoundException, InternalServiceException { final com.amazonaws.blox.dataservicemodel.v1.model.EnvironmentId environmentIdFromRequest = describeEnvironmentRevisionRequest.getEnvironmentId(); final EnvironmentId environmentId = apiModelMapper.toModelEnvironmentId(environmentIdFromRequest); final String environmentRevisionId = describeEnvironmentRevisionRequest.getEnvironmentRevisionId(); try { final EnvironmentRevision environmentRevision = environmentRepository.getEnvironmentRevision(environmentId, environmentRevisionId); return DescribeEnvironmentRevisionResponse.builder() .environmentRevision(apiModelMapper.toWrapperEnvironmentRevision(environmentRevision)) .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); } }  DescribeEnvironmentRevisionResponse describeEnvironmentRevision(
      @NonNull final DescribeEnvironmentRevisionRequest describeEnvironmentRevisionRequest);  }