### Question:
Xs2aAisConsentMapper { public SpiAccountConsent mapToSpiAccountConsent(AisConsent aisConsent) { return Optional.ofNullable(aisConsent) .map(ac -> new SpiAccountConsent( ac.getId(), xs2aToSpiAccountAccessMapper.mapToAccountAccess(ac), ac.isRecurringIndicator(), ac.getValidUntil(), ac.getExpireDate(), ac.getFrequencyPerDay(), ac.getLastActionDate(), ac.getConsentStatus(), ac.isWithBalance(), ac.getConsentTppInformation().isTppRedirectPreferred(), xs2aToSpiPsuDataMapper.mapToSpiPsuDataList(ac.getPsuIdDataList()), ac.getTppInfo(), ac.getAisConsentRequestType(), ac.getStatusChangeTimestamp(), ac.getCreationTimestamp(), ac.getInstanceId(), ac.getConsentType() ) ) .orElse(null); }  SpiAccountConsent mapToSpiAccountConsent(AisConsent aisConsent); UpdateConsentPsuDataReq mapToUpdateConsentPsuDataReq(UpdateAuthorisationRequest request,
                                                                AuthorisationProcessorResponse response); SpiScaConfirmation mapToSpiScaConfirmation(UpdateAuthorisationRequest request, PsuIdData psuData); CmsConsent mapToCmsConsent(CreateConsentReq request, PsuIdData psuData, TppInfo tppInfo, int allowedFrequencyPerDay); AisConsent mapToAisConsent(CmsConsent ais);  }### Answer:
@Test void mapToSpiAccountConsent() { AisConsent ais = jsonReader.getObjectFromFile("json/service/mapper/consent/xs2a-account-consent.json", AisConsent.class); SpiAccountConsent spiAccountConsent = mapper.mapToSpiAccountConsent(ais); SpiAccountConsent spiAccountConsentExpected = jsonReader.getObjectFromFile("json/service/mapper/consent/spi-account-consent.json", SpiAccountConsent.class); assertEquals(spiAccountConsentExpected, spiAccountConsent); }