### Question:
ConsentDataMapper { public AisConsentData mapToAisConsentData(byte[] consentData) { if (consentData == null) { return AisConsentData.buildDefaultAisConsentData(); } try { return objectMapper.readValue(consentData, AisConsentData.class); } catch (IOException e) { log.info("Can't convert byte[] to AisConsentData: {}", e.getMessage()); return null; } }  AisConsentData mapToAisConsentData(byte[] consentData); PiisConsentData mapToPiisConsentData(byte[] consentData); byte[] getBytesFromConsentData(Object consentData);  }### Answer:
@Test void mapToAisConsentData() { AisConsentData consentData = jsonReader.getObjectFromFile("json/data/ais/ais-consent-data.json", AisConsentData.class); byte[] bytesFromConsentData = consentDataMapper.getBytesFromConsentData(consentData); assertEquals(consentData, consentDataMapper.mapToAisConsentData(bytesFromConsentData)); }