### Question:
PluginConfigurationProcessor { static Set<Path> getAllFiles(Set<Path> paths) throws IOException { Set<Path> expanded = new HashSet<>(); for (Path path : paths) { if (Files.isRegularFile(path)) { expanded.add(path); } else if (Files.isDirectory(path)) { try (Stream<Path> dirWalk = Files.walk(path)) { dirWalk.filter(Files::isRegularFile).forEach(expanded::add); } } } return expanded; }  static JibBuildRunner createJibBuildRunnerForDockerDaemonImage(
      RawConfiguration rawConfiguration,
      InferredAuthProvider inferredAuthProvider,
      ProjectProperties projectProperties,
      HelpfulSuggestions helpfulSuggestions); static JibBuildRunner createJibBuildRunnerForTarImage(
      RawConfiguration rawConfiguration,
      InferredAuthProvider inferredAuthProvider,
      ProjectProperties projectProperties,
      HelpfulSuggestions helpfulSuggestions); static JibBuildRunner createJibBuildRunnerForRegistryImage(
      RawConfiguration rawConfiguration,
      InferredAuthProvider inferredAuthProvider,
      ProjectProperties projectProperties,
      HelpfulSuggestions helpfulSuggestions); static String getSkaffoldSyncMap(
      RawConfiguration rawConfiguration, ProjectProperties projectProperties, Set<Path> excludes);  }### Answer:
@Test public void getAllFiles_expandsDirectories() throws IOException { File rootFile = temporaryFolder.newFile("file"); File folder = temporaryFolder.newFolder("folder"); File folderFile = temporaryFolder.newFile("folder/file2"); Assert.assertEquals( ImmutableSet.of(rootFile.toPath().toAbsolutePath(), folderFile.toPath().toAbsolutePath()), PluginConfigurationProcessor.getAllFiles( ImmutableSet.of(rootFile.toPath(), folder.toPath()))); }
@Test public void getAllFiles_doesntBreakForNonExistentFiles() throws IOException { Path testPath = Paths.get("/a/file/that/doesnt/exist"); Assert.assertFalse(Files.exists(testPath)); Assert.assertEquals( ImmutableSet.of(), PluginConfigurationProcessor.getAllFiles(ImmutableSet.of(testPath))); }