class ReclassificationDistributionService {

    public void exportReclassificationChildNodes(Set<String> unitIds, String unitsToUpdateJsonLineFileName,
        String objectGroupsToUpdateJsonLineFileName)
        throws IOException, InvalidParseOperationException, InvalidCreateOperationException {

        SelectMultiQuery select = createSelectRequest(unitIds);
        Iterator<JsonNode> iterator = executeSelectAsIterator(select);

        File tempUnitReportFile = null;
        File tempObjectGroupReportFile = null;

        try {

            tempUnitReportFile = File.createTempFile(UNIT_LIST_TMP_FILE_PREFIX, JSONL_EXTENSION,
                new File(VitamConfiguration.getVitamTmpFolder()));
            tempObjectGroupReportFile = File.createTempFile(OBJECT_GROUP_LIST_TMP_FILE_PREFIX, JSONL_EXTENSION,
                new File(VitamConfiguration.getVitamTmpFolder()));

            try (JsonLineWriter unitReportWriter = new JsonLineWriter(new FileOutputStream(tempUnitReportFile));
                JsonLineWriter objectGroupReportWriter = new JsonLineWriter(
                    new FileOutputStream(tempObjectGroupReportFile))) {
                appendEntries(iterator, unitReportWriter, objectGroupReportWriter);
            }

            storeIntoWorkspace(unitsToUpdateJsonLineFileName, tempUnitReportFile);
            storeIntoWorkspace(objectGroupsToUpdateJsonLineFileName, tempObjectGroupReportFile);

        } finally {
            FileUtils.deleteQuietly(tempUnitReportFile);
            FileUtils.deleteQuietly(tempObjectGroupReportFile);
        }
    }

    public  ReclassificationDistributionService(MetaDataImpl metaData);
    @VisibleForTesting  ReclassificationDistributionService(
        WorkspaceClientFactory workspaceClientFactory,
        MetaDataImpl metaData);

}