@Test void downloadTransactionTemplate() { when(downloadResourceService.getResourceByTemplate(any())).thenReturn(resourceLoader.getResource(FILE_NAME)); ResponseEntity<Resource> response = uploaderController.downloadTransactionTemplate(); assertTrue(response.getStatusCode().is2xxSuccessful()); }
@Override public ResponseEntity<Resource> downloadTransactionTemplate() { return ResponseEntity.ok() .contentType(MediaType.APPLICATION_OCTET_STREAM) .header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=" + FILE_NAME) .body(downloadResourceService.getResourceByTemplate(FILE_NAME)); }
TppDataUploaderController implements TppDataUploaderRestApi { @Override public ResponseEntity<Resource> downloadTransactionTemplate() { return ResponseEntity.ok() .contentType(MediaType.APPLICATION_OCTET_STREAM) .header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=" + FILE_NAME) .body(downloadResourceService.getResourceByTemplate(FILE_NAME)); } }
TppDataUploaderController implements TppDataUploaderRestApi { @Override public ResponseEntity<Resource> downloadTransactionTemplate() { return ResponseEntity.ok() .contentType(MediaType.APPLICATION_OCTET_STREAM) .header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=" + FILE_NAME) .body(downloadResourceService.getResourceByTemplate(FILE_NAME)); }  }
TppDataUploaderController implements TppDataUploaderRestApi { @Override public ResponseEntity<Resource> downloadTransactionTemplate() { return ResponseEntity.ok() .contentType(MediaType.APPLICATION_OCTET_STREAM) .header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=" + FILE_NAME) .body(downloadResourceService.getResourceByTemplate(FILE_NAME)); }  @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(); }
TppDataUploaderController implements TppDataUploaderRestApi { @Override public ResponseEntity<Resource> downloadTransactionTemplate() { return ResponseEntity.ok() .contentType(MediaType.APPLICATION_OCTET_STREAM) .header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=" + FILE_NAME) .body(downloadResourceService.getResourceByTemplate(FILE_NAME)); }  @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();  }