### Question:
CmsConfirmationOfFundsMapper { public CmsConfirmationOfFundsConsent mapToCmsConfirmationOfFundsConsent(ConsentEntity consent, List<AuthorisationEntity> authorisations) { ConsentTppInformationEntity tppInformation = consent.getTppInformation(); PiisConsentData piisConsentData = consentDataMapper.mapToPiisConsentData(consent.getData()); return new CmsConfirmationOfFundsConsent( consent.getExternalId(), getAccountReference(consent), consent.getValidUntil(), consent.getExpireDate(), consent.getLastActionDate(), consent.getConsentStatus(), tppInformation.isTppRedirectPreferred(), psuDataMapper.mapToPsuIdDataList(consent.getPsuDataList()), tppInfoMapper.mapToTppInfo(tppInformation.getTppInfo()), authorisationTemplateMapper.mapToAuthorisationTemplate(consent.getAuthorisationTemplate()), consent.isMultilevelScaRequired(), consent.getCreationTimestamp(), consent.getStatusChangeTimestamp(), mapToAuthorisations(authorisations), piisConsentData.getCardNumber(), piisConsentData.getCardExpiryDate(), piisConsentData.getCardInformation(), piisConsentData.getRegistrationInformation() ); }  CmsConfirmationOfFundsConsent mapToCmsConfirmationOfFundsConsent(ConsentEntity consent, List<AuthorisationEntity> authorisations);  }### Answer:
@Test void mapToCmsConfirmationOfFundsConsent() { ConsentEntity consent = jsonReader.getObjectFromFile("json/service/mapper/piis-consent-mapper/consent-entity-empty-authorisations.json", ConsentEntity.class); List<AuthorisationEntity> authorisations = Collections.singletonList(jsonReader.getObjectFromFile("json/service/mapper/piis-consent-mapper/authorisation-entity.json", AuthorisationEntity.class)); CmsConfirmationOfFundsConsent actual = mapper.mapToCmsConfirmationOfFundsConsent(consent, authorisations); CmsConfirmationOfFundsConsent expected = jsonReader.getObjectFromFile("json/service/mapper/piis-consent-mapper/cms-piis-consent-with-authorisations.json", CmsConfirmationOfFundsConsent.class); assertEquals(expected, actual); }
@Test void mapToCmsConfirmationOfFundsConsent_emptyAuthorisations() { ConsentEntity consent = jsonReader.getObjectFromFile("json/service/mapper/piis-consent-mapper/consent-entity-empty-authorisations.json", ConsentEntity.class); CmsConfirmationOfFundsConsent actual = mapper.mapToCmsConfirmationOfFundsConsent(consent, null); CmsConfirmationOfFundsConsent expected = jsonReader.getObjectFromFile("json/service/mapper/piis-consent-mapper/cms-piis-consent-empty-authorisations.json", CmsConfirmationOfFundsConsent.class); assertEquals(expected, actual); }