### Question:
ParseService { public byte[] generateFileByPayload(DataPayload data) { try { return objectMapper.writeValueAsBytes(data); } catch (JsonProcessingException e) { log.error("Could not write bytes"); return new byte[]{}; } }  Optional<T> getDataFromFile(MultipartFile input, TypeReference<T> typeReference); Optional<DataPayload> getDefaultData(); byte[] generateFileByPayload(DataPayload data); List<T> convertFileToTargetObject(MultipartFile file, Class<T> target);  }### Answer:
@Test void generateFileByPayload() { byte[] result = parseService.generateFileByPayload(new DataPayload()); assertThat(result).isNotEmpty(); }