@Test public void mapsInputsAndOutputsCorrectly() throws Exception { EnvironmentId id = EnvironmentId.builder() .accountId(ACCOUNT_ID) .cluster(TEST_CLUSTER) .environmentName(ENVIRONMENT_NAME) .build(); EnvironmentRevision environmentRevision = environmentRevisionDS(id, instanceGroupWithAttributeDS(ATTRIBUTE_NAME, ATTRIBUTE_VALUE)); when(dataService.describeEnvironmentRevision(any())) .thenReturn( com.amazonaws.blox.dataservicemodel.v1.model.wrappers .DescribeEnvironmentRevisionResponse.builder() .environmentRevision(environmentRevision) .build()); DescribeEnvironmentRevisionResponse response = controller.describeEnvironmentRevision( TEST_CLUSTER, ENVIRONMENT_NAME, ENVIRONMENT_REVISION_ID); verify(dataService) .describeEnvironmentRevision( com.amazonaws.blox.dataservicemodel.v1.model.wrappers.DescribeEnvironmentRevisionRequest .builder() .environmentId(id) .environmentRevisionId(ENVIRONMENT_REVISION_ID) .build()); assertThat(response).isNotNull(); assertThat(response.getEnvironmentRevision()); }
@RequestMapping( path = "/{environmentName}/revisions/{environmentRevisionId}", method = RequestMethod.GET ) @ApiOperation(value = "Describe Environment revisions") public DescribeEnvironmentRevisionResponse describeEnvironmentRevision( @PathVariable("cluster") String cluster, @PathVariable("environmentName") String environmentName, @PathVariable("environmentRevisionId") String environmentRevisionId) throws ServiceException, ClientException { return mapper.fromDataServiceResponse( dataService.describeEnvironmentRevision( mapper.toDataServiceRequest( getApiGatewayRequestContext(), cluster, environmentName, environmentRevisionId))); }
DescribeEnvironmentRevision extends EnvironmentController { @RequestMapping( path = "/{environmentName}/revisions/{environmentRevisionId}", method = RequestMethod.GET ) @ApiOperation(value = "Describe Environment revisions") public DescribeEnvironmentRevisionResponse describeEnvironmentRevision( @PathVariable("cluster") String cluster, @PathVariable("environmentName") String environmentName, @PathVariable("environmentRevisionId") String environmentRevisionId) throws ServiceException, ClientException { return mapper.fromDataServiceResponse( dataService.describeEnvironmentRevision( mapper.toDataServiceRequest( getApiGatewayRequestContext(), cluster, environmentName, environmentRevisionId))); } }
DescribeEnvironmentRevision extends EnvironmentController { @RequestMapping( path = "/{environmentName}/revisions/{environmentRevisionId}", method = RequestMethod.GET ) @ApiOperation(value = "Describe Environment revisions") public DescribeEnvironmentRevisionResponse describeEnvironmentRevision( @PathVariable("cluster") String cluster, @PathVariable("environmentName") String environmentName, @PathVariable("environmentRevisionId") String environmentRevisionId) throws ServiceException, ClientException { return mapper.fromDataServiceResponse( dataService.describeEnvironmentRevision( mapper.toDataServiceRequest( getApiGatewayRequestContext(), cluster, environmentName, environmentRevisionId))); }  }
DescribeEnvironmentRevision extends EnvironmentController { @RequestMapping( path = "/{environmentName}/revisions/{environmentRevisionId}", method = RequestMethod.GET ) @ApiOperation(value = "Describe Environment revisions") public DescribeEnvironmentRevisionResponse describeEnvironmentRevision( @PathVariable("cluster") String cluster, @PathVariable("environmentName") String environmentName, @PathVariable("environmentRevisionId") String environmentRevisionId) throws ServiceException, ClientException { return mapper.fromDataServiceResponse( dataService.describeEnvironmentRevision( mapper.toDataServiceRequest( getApiGatewayRequestContext(), cluster, environmentName, environmentRevisionId))); }  @RequestMapping( path = "/{environmentName}/revisions/{environmentRevisionId}", method = RequestMethod.GET ) @ApiOperation(value = "Describe Environment revisions") DescribeEnvironmentRevisionResponse describeEnvironmentRevision(
      @PathVariable("cluster") String cluster,
      @PathVariable("environmentName") String environmentName,
      @PathVariable("environmentRevisionId") String environmentRevisionId); }
DescribeEnvironmentRevision extends EnvironmentController { @RequestMapping( path = "/{environmentName}/revisions/{environmentRevisionId}", method = RequestMethod.GET ) @ApiOperation(value = "Describe Environment revisions") public DescribeEnvironmentRevisionResponse describeEnvironmentRevision( @PathVariable("cluster") String cluster, @PathVariable("environmentName") String environmentName, @PathVariable("environmentRevisionId") String environmentRevisionId) throws ServiceException, ClientException { return mapper.fromDataServiceResponse( dataService.describeEnvironmentRevision( mapper.toDataServiceRequest( getApiGatewayRequestContext(), cluster, environmentName, environmentRevisionId))); }  @RequestMapping( path = "/{environmentName}/revisions/{environmentRevisionId}", method = RequestMethod.GET ) @ApiOperation(value = "Describe Environment revisions") DescribeEnvironmentRevisionResponse describeEnvironmentRevision(
      @PathVariable("cluster") String cluster,
      @PathVariable("environmentName") String environmentName,
      @PathVariable("environmentRevisionId") String environmentRevisionId);  }