### Question:
ProcessStateManager extends AbstractDao { @WithTimer public void importPath(ProcessKey processKey, String path, Path src, BiFunction<Path, BasicFileAttributes, Boolean> filter) { tx(tx -> importPath(tx, processKey, path, src, filter)); } @Inject protected  ProcessStateManager(@MainDB Configuration cfg,
                                  SecretStoreConfiguration secretCfg,
                                  ProcessConfiguration stateCfg,
                                  PolicyManager policyManager,
                                  ProcessLogManager logManager,
                                  ProcessKeyCache processKeyCache); @Override void tx(Tx t); Optional<T> get(PartialProcessKey partialProcessKey, String path, Function<InputStream, Optional<T>> converter); Optional<T> get(ProcessKey processKey, String path, Function<InputStream, Optional<T>> converter); List<T> forEach(ProcessKey processKey, String path, Function<InputStream, Optional<T>> converter); List<String> list(PartialProcessKey partialProcessKey, String path); Optional<T> findPath(ProcessKey processKey, String path, Function<Stream<String>, Optional<T>> converter); boolean exists(PartialProcessKey partialProcessKey, String path); boolean exists(ProcessKey processKey, String path); void deleteFile(ProcessKey processKey, String path); void deleteFile(DSLContext tx, ProcessKey processKey, String path); void delete(ProcessKey processKey); @WithTimer void deleteDirectory(DSLContext tx, ProcessKey processKey, String path); void replace(ProcessKey processKey, String path, byte[] data); void insert(DSLContext tx, ProcessKey processKey, String path, byte[] in); void replacePath(ProcessKey processKey, Path src, BiFunction<Path, BasicFileAttributes, Boolean> filter); @WithTimer void importPath(ProcessKey processKey, String path, Path src, BiFunction<Path, BasicFileAttributes, Boolean> filter); @WithTimer void importPath(DSLContext tx, ProcessKey processKey, String path, Path src, BiFunction<Path, BasicFileAttributes, Boolean> filter); boolean export(ProcessKey processKey, ItemConsumer consumer); boolean exportDirectory(ProcessKey processKey, String path, ItemConsumer consumer); static ItemConsumer copyTo(Path dst, OpenOption... options); static ItemConsumer copyTo(Path dst, String[] ignored, OpenOption... options); static ItemConsumer zipTo(ZipArchiveOutputStream dst); static ItemConsumer exclude(ItemConsumer delegate, String... patterns); static String path(String... elements);  }### Answer:
@Ignore @Test public void testLargeImport() throws Exception { ProcessKey processKey = new ProcessKey(UUID.randomUUID(), OffsetDateTime.now()); int files = 100; int chunkSize = 1024 * 1024; int fileSize = 10 * chunkSize; byte[] ab = new byte[chunkSize]; Arrays.fill(ab, (byte) 0); Path baseDir = Files.createTempDirectory("test"); for (int i = 0; i < files; i++) { Path p = baseDir.resolve("file" + i); try (OutputStream out = Files.newOutputStream(p, StandardOpenOption.CREATE)) { for (int j = 0; j < fileSize; j += chunkSize) { out.write(ab); } } } ProcessKeyCache processKeyCache = new ProcessKeyCache(new ProcessQueueDao(getConfiguration(), new ConcordObjectMapper(new ObjectMapper()))); ProcessConfiguration stateCfg = new ProcessConfiguration("24 hours", Collections.singletonList(Constants.Files.CONFIGURATION_FILE_NAME)); ProcessStateManager stateManager = new ProcessStateManager(getConfiguration(), mock(SecretStoreConfiguration.class), stateCfg, mock(PolicyManager.class), mock(ProcessLogManager.class), processKeyCache); stateManager.importPath(processKey, "/", baseDir, (p, attrs) -> true); }