### Question:
AuthorisationModelMapper { @Mapping(target = "_links", ignore = true) @Mapping(target = "links", expression = "java(hrefLinkMapper.mapToLinksMap(xs2aResponse.getLinks()))") @Mapping(target = "scaMethods", source = "availableScaMethods") public abstract UpdatePsuAuthenticationResponse mapToUpdatePsuAuthenticationResponse(Xs2aUpdatePisCommonPaymentPsuDataResponse xs2aResponse);  Object mapToStartOrUpdateCancellationResponse(CancellationAuthorisationResponse cancellationAuthorisationResponse); @Mapping(target = "_links", ignore = true) @Mapping(target = "challengeData", ignore = true) @Mapping(target = "chosenScaMethod", ignore = true) @Mapping(target = "psuMessage", ignore = true) @Mapping(target = "scaMethods", ignore = true) @Mapping(target = "links", expression = "java(hrefLinkMapper.mapToLinksMap(xs2aResponse.getLinks()))") abstract StartScaprocessResponse mapToStartScaProcessResponse(Xs2aCreatePisAuthorisationResponse xs2aResponse); @Mapping(target = "_links", ignore = true) @Mapping(target = "challengeData", ignore = true) @Mapping(target = "chosenScaMethod", ignore = true) @Mapping(target = "scaMethods", ignore = true) @Mapping(target = "links", expression = "java(hrefLinkMapper.mapToLinksMap(xs2aResponse.getLinks()))") abstract StartScaprocessResponse mapToStartScaProcessResponse(CreateConsentAuthorizationResponse xs2aResponse); @Mapping(target = "_links", ignore = true) @Mapping(target = "challengeData", ignore = true) @Mapping(target = "chosenScaMethod", ignore = true) @Mapping(target = "scaMethods", ignore = true) @Mapping(target = "links", expression = "java(hrefLinkMapper.mapToLinksMap(xs2aResponse.getLinks()))") abstract StartScaprocessResponse mapToStartScaProcessResponseCancellation(Xs2aCreatePisCancellationAuthorisationResponse xs2aResponse); @Mapping(target = "_links", ignore = true) @Mapping(target = "links", expression = "java(hrefLinkMapper.mapToLinksMap(xs2aResponse.getLinks()))") @Mapping(target = "scaMethods", source = "availableScaMethods") abstract UpdatePsuAuthenticationResponse mapToUpdatePsuAuthenticationResponse(Xs2aUpdatePisCommonPaymentPsuDataResponse xs2aResponse);  }### Answer:
@Test void mapToUpdatePsuAuthenticationResponse() { Xs2aUpdatePisCommonPaymentPsuDataResponse objectFromFile = jsonReader.getObjectFromFile("json/web/mapper/Xs2aUpdatePisCommonPaymentPsuDataResponse.json", Xs2aUpdatePisCommonPaymentPsuDataResponse.class); UpdatePsuAuthenticationResponse expected = jsonReader.getObjectFromFile("json/web/mapper/UpdatePsuAuthenticationResponse.json", UpdatePsuAuthenticationResponse.class); UpdatePsuAuthenticationResponse actual = authorisationModelMapper.mapToUpdatePsuAuthenticationResponse(objectFromFile); assertEquals(expected, actual); verify(mockCoreObjectsMapper).mapToModelScaStatus(any(ScaStatus.class)); verify(mockHrefLinkMapper).mapToLinksMap(any(Links.class)); assertNotNull(actual.getChosenScaMethod()); assertNotNull(actual.getChallengeData()); assertNotNull(actual.getScaMethods()); assertNotNull(actual.getPsuMessage()); assertNotNull(actual.getAuthorisationId()); assertNotNull(actual.getScaStatus()); assertFalse(actual.getLinks().isEmpty()); }
@Test void mapToUpdatePsuAuthenticationResponse_withNullXs2aResponse_shouldReturnNull() { UpdatePsuAuthenticationResponse actual = authorisationModelMapper.mapToUpdatePsuAuthenticationResponse(null); assertNull(actual); }