### Question:
TppDataUploaderController implements TppDataUploaderRestApi { @Override public ResponseEntity<Resource> generateData(boolean generatePayments, String currency) { log.info("Request to create test data received"); byte[] bytes = generationService.generate(generatePayments, Currency.getInstance(currency)); InputStreamResource resource = new InputStreamResource(new ByteArrayInputStream(bytes)); HttpHeaders headers = getExportFileHttpHeaders(); return ResponseEntity.ok() .headers(headers) .contentLength(bytes.length) .contentType(MediaType.APPLICATION_OCTET_STREAM) .body(resource); }  @Override ResponseEntity<String> uploadData(MultipartFile file); @Override ResponseEntity<Resource> generateData(boolean generatePayments, String currency); @Override ResponseEntity<String> generateIban(String tppId); @Override ResponseEntity<Map<String, String>> uploadTransactions(MultipartFile file); @Override ResponseEntity<Resource> downloadTransactionTemplate();  }### Answer:
@Test void generateData() throws JsonProcessingException { when(generationService.generate(false, CURRENCY)).thenReturn(getBytes()); ResponseEntity<Resource> response = uploaderController.generateData(false, "EUR"); assertTrue(response.getStatusCode().is2xxSuccessful()); }