@Test public void translateFromListResponse_nullResourceModel() { assertThatThrownBy(() -> Translator.translateFromListResponse(null)) .hasNoCause() .hasMessageStartingWith("awsResponse is marked") .isExactlyInstanceOf(NullPointerException.class); }
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()); }    }