DropService { @Pollable(expectedSubTaskNumber = 1, message = "Start the Drop export process") public PollableFuture<Drop> startDropExportProcess( ExportDropConfig exportDropConfig, @InjectCurrentTask PollableTask currentTask) throws DropExporterException { Repository repository = repositoryRepository.findById(exportDropConfig.getRepositoryId()).orElse(null); Drop drop = createDrop(repository); drop.setExportPollableTask(currentTask); createDropExporterAndExportTranslationKits(drop, exportDropConfig.getBcp47Tags(), exportDropConfig.getType(), exportDropConfig.getUseInheritance(), currentTask, PollableTask.INJECT_CURRENT_TASK); return new PollableFutureTaskResult<>(drop); }  Drop createDrop(Repository repository); @Pollable(expectedSubTaskNumber = 1, message = "Start the Drop export process") PollableFuture<Drop> startDropExportProcess(
            ExportDropConfig exportDropConfig,
            @InjectCurrentTask PollableTask currentTask); @Pollable(async = true, message = "Start importing drop", expectedSubTaskNumber = 1) PollableFuture importDrop(
            Long dropId,
            TMTextUnitVariant.Status importStatus,
            @InjectCurrentTask PollableTask currentTask); @Pollable(async = true, message = "Start canceling drop") PollableFuture<Drop> cancelDrop(Long dropId, @InjectCurrentTask PollableTask currentTask); @Transactional void completeDrop(Drop drop);  }
@Test public void forNoEmptyXliffs() throws Exception { TMTestData tmTestData = new TMTestData(testIdWatcher); Repository repository = tmTestData.repository; tmTestData.addCurrentTMTextUnitVariant1FrFR.setStatus(Status.APPROVED); tmService.addCurrentTMTextUnitVariant(tmTestData.addTMTextUnit2.getId(), localeService.findByBcp47Tag("fr-FR").getId(), "French stuff here."); List<String> bcp47Tags = new ArrayList<>(); bcp47Tags.add("fr-FR"); bcp47Tags.add("ja-JP"); ExportDropConfig exportDropConfig = new ExportDropConfig(); exportDropConfig.setRepositoryId(repository.getId()); exportDropConfig.setBcp47Tags(bcp47Tags); logger.debug("Check inital number of untranslated units"); checkNumberOfUntranslatedTextUnit(repository, bcp47Tags, 2); logger.debug("Create an initial drop for the repository"); PollableFuture<Drop> startExportProcess = dropService.startDropExportProcess(exportDropConfig, PollableTask.INJECT_CURRENT_TASK); PollableTask pollableTask = startExportProcess.getPollableTask(); logger.debug("Wait for export to finish"); pollableTaskService.waitForPollableTask(pollableTask.getId(), 600000L); logger.debug("Drop export finished, localize files in Box without updating the state"); Drop drop = startExportProcess.get(); FileSystemDropExporter fileSystemDropExporter = (FileSystemDropExporter) dropExporterService.recreateDropExporter(drop); FileSystemDropExporterConfig fileSystemDropExporterConfig = fileSystemDropExporter.getFileSystemDropExporterConfig(); File frFR = new File(Paths.get(fileSystemDropExporterConfig.getDropFolderPath(), DROP_FOLDER_SOURCE_FILES_NAME, "fr-FR.xliff").toString()); assertFalse(frFR.exists()); }