### Question:
Translator { static DescribeTypeRequest translateToReadRequest(@NonNull final ResourceModel model) { if (model.getArn() != null) { return DescribeTypeRequest.builder() .arn(model.getArn()) .build(); } else { return DescribeTypeRequest.builder() .type(RegistryType.RESOURCE) .typeName(model.getTypeName()) .versionId(model.getVersionId()) .build(); } }    }### Answer:
@Test public void translateToReadRequest_nullResourceModel() { assertThatThrownBy(() -> Translator.translateToReadRequest(null)) .hasNoCause() .hasMessageStartingWith("model is marked") .isExactlyInstanceOf(NullPointerException.class); }
@Test public void translateToReadRequest_typeAndVersion() { ResourceModel model = ResourceModel.builder() .typeName("AWS::Test::Resource") .versionId("00000002") .build(); DescribeTypeRequest request = Translator.translateToReadRequest(model); assertThat(request.arn()).isNull(); assertThat(request.type()).isEqualTo(RegistryType.RESOURCE); assertThat(request.typeName()).isEqualTo("AWS::Test::Resource"); assertThat(request.versionId()).isEqualTo("00000002"); }