DropWS { @RequestMapping(method = RequestMethod.POST, value = "/api/drops/import") public ImportDropConfig importDrop(@RequestBody ImportDropConfig importDropConfig) throws Exception { PollableFuture importDropFuture = dropService.importDrop(importDropConfig.getDropId(), importDropConfig.getStatus(), PollableTask.INJECT_CURRENT_TASK); importDropConfig.setPollableTask(importDropFuture.getPollableTask()); return importDropConfig; }  @JsonView(View.DropSummary.class) @RequestMapping(method = RequestMethod.GET, value = "/api/drops") Page<Drop> getDrops(
            @RequestParam(value = "repositoryId", required = false) Long repositoryId,
            @RequestParam(value = "imported", required = false) Boolean importedFilter,
            @RequestParam(value = "canceled", required = false) Boolean canceledFilter,
            @PageableDefault(sort = "id", direction = Sort.Direction.DESC) Pageable pageable); @RequestMapping(method = RequestMethod.POST, value = "/api/drops/export") ExportDropConfig exportDrop(@RequestBody ExportDropConfig exportDropConfig); @RequestMapping(method = RequestMethod.POST, value = "/api/drops/import") ImportDropConfig importDrop(@RequestBody ImportDropConfig importDropConfig); @RequestMapping(method = RequestMethod.POST, value = "/api/drops/cancel") CancelDropConfig cancelDrop(@RequestBody CancelDropConfig cancelDropConfig); @RequestMapping(value = "/api/drops/complete/{dropId}", method = RequestMethod.POST) void completeDropById(@PathVariable Long dropId); @RequestMapping(method = RequestMethod.POST, value = "/api/drops/importXliff") ImportXliffBody importXliff(@RequestBody ImportXliffBody importXliffBody);  }
@Test @Category({IntegrationTest.class}) public void testImportDrop() throws Exception { List<String> bcp47Tags = Arrays.asList("fr-FR", "ja-JP"); Set<RepositoryLocale> repositoryLocales = getRepositoryLocales(bcp47Tags); Repository repository = repositoryClient.createRepository(testIdWatcher.getEntityName("repository"), null, null, repositoryLocales, null, null); ExportDropConfig exportDropConfig = new ExportDropConfig(); exportDropConfig.setRepositoryId(repository.getId()); exportDropConfig.setBcp47Tags(bcp47Tags); exportDropConfig = dropClient.exportDrop(exportDropConfig); pollableTaskClient.waitForPollableTask(exportDropConfig.getPollableTask().getId()); ImportDropConfig importDropResult = dropClient.importDrop(repository, exportDropConfig.getDropId(), null); PollableTask importTask = importDropResult.getPollableTask(); pollableTaskClient.waitForPollableTask(importTask.getId(), 20000L); assertEquals(importDropResult.getDropId(), exportDropConfig.getDropId()); }