ListHandler extends BaseHandler<CallbackContext> { @Override public ProgressEvent<ResourceModel, CallbackContext> handleRequest( final AmazonWebServicesClientProxy proxy, final ResourceHandlerRequest<ResourceModel> request, final CallbackContext callbackContext, final Logger logger) { this.clientProxy = proxy; this.logger = logger; final ListDistributionConfigurationsResponse response = proxy.injectCredentialsAndInvokeV2(RequestUtil.generateListDistributionConfigurationsRequest(request.getNextToken()), ClientBuilder.getImageBuilderClient()::listDistributionConfigurations); return ProgressEvent.<ResourceModel, CallbackContext>builder() .status(OperationStatus.SUCCESS) .resourceModels(Translator.translateForList(response)) .nextToken(response.nextToken()) .build(); }  @Override ProgressEvent<ResourceModel, CallbackContext> handleRequest(
            final AmazonWebServicesClientProxy proxy,
            final ResourceHandlerRequest<ResourceModel> request,
            final CallbackContext callbackContext,
            final Logger logger);  }
@Test public void handleRequest_Success() { final ListDistributionConfigurationsResponse listDistributionConfigurationsResponse = ListDistributionConfigurationsResponse.builder() .distributionConfigurationSummaryList(DISTRIBUTION_CONFIGURATION_SUMMARIES) .build(); doReturn(listDistributionConfigurationsResponse) .when(proxy) .injectCredentialsAndInvokeV2(any(), any()); final ListHandler handler = new ListHandler(); final ResourceModel model = ResourceModel.builder().build(); final ResourceHandlerRequest<ResourceModel> request = ResourceHandlerRequest.<ResourceModel>builder() .desiredResourceState(model) .build(); final ProgressEvent<ResourceModel, CallbackContext> response = handler.handleRequest(proxy, request, null, logger); assertThat(response).isNotNull(); assertThat(response.getStatus()).isEqualTo(OperationStatus.SUCCESS); assertThat(response.getCallbackContext()).isNull(); assertThat(response.getCallbackDelaySeconds()).isEqualTo(0); assertThat(response.getResourceModel()).isNull(); assertThat(response.getResourceModels()).isNotNull(); assertThat(response.getMessage()).isNull(); assertThat(response.getErrorCode()).isNull(); }