### Question:
PiisConsentMapper { public List<CmsPiisConsent> mapToCmsPiisConsentList(List<ConsentEntity> consentEntities) { return consentEntities.stream() .map(this::mapToCmsPiisConsent) .collect(Collectors.toList()); }  List<CmsPiisConsent> mapToCmsPiisConsentList(List<ConsentEntity> consentEntities); CmsPiisConsent mapToCmsPiisConsent(ConsentEntity consentEntity); ConsentEntity mapToPiisConsentEntity(PsuIdData psuIdData, TppInfoEntity tppInfoEntity, CreatePiisConsentRequest request,
                                                String instanceId);  }### Answer:
@Test void mapToPiisConsentList() { ConsentEntity piisConsentEntity = jsonReader.getObjectFromFile("json/service/mapper/piis-consent-entity.json", ConsentEntity.class); PiisConsentData piisConsentData = jsonReader.getObjectFromFile("json/service/mapper/piis-consent-data.json", PiisConsentData.class); piisConsentEntity.setData(consentDataMapper.getBytesFromConsentData(piisConsentData)); List<CmsPiisConsent> actualCmsPiisConsentList = piisConsentMapper.mapToCmsPiisConsentList(Collections.singletonList(piisConsentEntity)); CmsPiisConsent expectedPiisConsent = jsonReader.getObjectFromFile("json/service/mapper/cms-piis-consent.json", CmsPiisConsent.class); assertNotNull(actualCmsPiisConsentList); assertEquals(1, actualCmsPiisConsentList.size()); assertEquals(expectedPiisConsent, actualCmsPiisConsentList.get(0)); }