### Question:
ConsentModelMapper { public ConsentStatusResponse200 mapToConsentStatusResponse200(ConsentStatusResponse consentStatusResponse) { return Optional.ofNullable(consentStatusResponse) .map(cstr -> { ConsentStatusResponse200 response200 = new ConsentStatusResponse200(); response200.setConsentStatus(ConsentStatus.fromValue(cstr.getConsentStatus())); response200.setPsuMessage(cstr.getPsuMessage()); return response200; }) .orElse(null); }  CreateConsentReq mapToCreateConsentReq(Consents consent, TppRedirectUri tppRedirectUri,
                                                  TppNotificationData tppNotificationData, String tppBrandLoggingInformation,
                                                  String instanceId); ConsentStatusResponse200 mapToConsentStatusResponse200(ConsentStatusResponse consentStatusResponse); ConsentsResponse201 mapToConsentsResponse201(CreateConsentResponse createConsentResponse); ConsentInformationResponse200Json mapToConsentInformationResponse200Json(AisConsent aisConsent); List<AccountReference> mapToXs2aAccountReferences(List<de.adorsys.psd2.model.AccountReference> references); AccountReference mapToAccountReference(Object reference); UpdateConsentPsuDataReq mapToUpdatePsuData(PsuIdData psuData, String consentId, String authorizationId, Map body); Authorisations mapToAuthorisations(Xs2aPaymentCancellationAuthorisationSubResource idsContainer); Xs2aUpdatePisCommonPaymentPsuDataRequest mapToPisUpdatePsuData(PsuIdData psuData, String paymentId, String authorisationId, PaymentType paymentService, String paymentProduct, Map body); final AccountModelMapper accountModelMapper; }### Answer:
@Test void mapToConsentStatusResponse200_WithCorrectInput() { ConsentStatusResponse inputData = new ConsentStatusResponse(ConsentStatus.RECEIVED, PSU_MESSAGE); ConsentStatusResponse200 expected = jsonReader.getObjectFromFile("json/service/mapper/consent-status-response-200.json", ConsentStatusResponse200.class); ConsentStatusResponse200 actual = consentModelMapper.mapToConsentStatusResponse200(inputData); assertEquals(expected, actual); }
@Test void mapToConsentStatusResponse200_WithNull() { ConsentStatusResponse200 actual = consentModelMapper.mapToConsentStatusResponse200(null); assertNull(actual); }