@Test public void translateFromListResponse_noTypes() { ListTypesResponse response = ListTypesResponse.builder().build(); List<ResourceModel> model = Translator.translateFromListResponse(response); assertThat(model.isEmpty()).isTrue(); }
static List<ResourceModel> translateFromListResponse(@NonNull final ListTypesResponse awsResponse) { return streamOfOrEmpty(awsResponse.typeSummaries()) .map(typeSummary -> ResourceModel.builder() .arn(typeSummary.typeArn()) .build()) .collect(Collectors.toList()); }
Translator { static List<ResourceModel> translateFromListResponse(@NonNull final ListTypesResponse awsResponse) { return streamOfOrEmpty(awsResponse.typeSummaries()) .map(typeSummary -> ResourceModel.builder() .arn(typeSummary.typeArn()) .build()) .collect(Collectors.toList()); } }
Translator { static List<ResourceModel> translateFromListResponse(@NonNull final ListTypesResponse awsResponse) { return streamOfOrEmpty(awsResponse.typeSummaries()) .map(typeSummary -> ResourceModel.builder() .arn(typeSummary.typeArn()) .build()) .collect(Collectors.toList()); }  }
Translator { static List<ResourceModel> translateFromListResponse(@NonNull final ListTypesResponse awsResponse) { return streamOfOrEmpty(awsResponse.typeSummaries()) .map(typeSummary -> ResourceModel.builder() .arn(typeSummary.typeArn()) .build()) .collect(Collectors.toList()); }   }
Translator { static List<ResourceModel> translateFromListResponse(@NonNull final ListTypesResponse awsResponse) { return streamOfOrEmpty(awsResponse.typeSummaries()) .map(typeSummary -> ResourceModel.builder() .arn(typeSummary.typeArn()) .build()) .collect(Collectors.toList()); }    }