### Question:
AisConsentMapper { @Mapping(target="tppId", source="tppInfo.authorisationNumber") @Mapping(target="access.availableAccounts", source="access.availableAccounts", qualifiedByName = "mapToAccountAccessType") @Mapping(target="access.allPsd2", source="access.allPsd2", qualifiedByName = "mapToAccountAccessType") public abstract AisConsentTO mapToAisConsent(SpiAccountConsent consent);  @Mapping(target="tppId", source="tppInfo.authorisationNumber") @Mapping(target="access.availableAccounts", source="access.availableAccounts", qualifiedByName = "mapToAccountAccessType") @Mapping(target="access.allPsd2", source="access.allPsd2", qualifiedByName = "mapToAccountAccessType") abstract AisConsentTO mapToAisConsent(SpiAccountConsent consent); @Mapping(target="tppId", source="tppAuthorisationNumber") @Mapping(target = "access.accounts", source = "account", qualifiedByName = "toAccountList") @Mapping(target = "access.balances", source = "account", qualifiedByName = "toAccountList") @Mapping(target = "access.transactions", source = "account", qualifiedByName = "toAccountList") abstract AisConsentTO mapPiisToAisConsent(SpiPiisConsent consent); AisAccountAccessTypeTO mapToAccountAccessType(AccountAccessType accountAccessType);  }### Answer:
@Test void mapToAisConsentWithRealData() { SpiAccountConsent inputData = jsonReader.getObjectFromFile("json/mappers/spi-account-consent.json", SpiAccountConsent.class); AisConsentTO expectedResponse = jsonReader.getObjectFromFile("json/mappers/ais-consent-to.json", AisConsentTO.class); AisConsentTO actualResponse = aisConsentMapper.mapToAisConsent(inputData); assertEquals(expectedResponse, actualResponse); }
@Test void mapToAisConsentWithNull() { AisConsentTO actualResponse = aisConsentMapper.mapToAisConsent(null); assertNull(actualResponse); }