public Collection<File> getUploadedFiles() throws IOException {
        if (uploadDirectory == null) {
            return Collections.emptyList();
        }

        FileAdderVisitor visitor = new FileAdderVisitor();
        Files.walkFileTree(uploadDirectory, visitor);

        return Collections.unmodifiableCollection(visitor.getContainedFiles());
    }
@Test
    void testEmptyDirectory() throws IOException {
        Path rootDir = Paths.get("root");

        Path tmp = temporaryFolder;
        Files.createDirectory(tmp.resolve(rootDir));

        try (FileUploads fileUploads = new FileUploads(tmp.resolve(rootDir))) {
            Collection<File> detectedFiles = fileUploads.getUploadedFiles();
            assertThat(detectedFiles).isEmpty();
        }
    }