### Question:
FixStackFramesDelegate { public void doIncrementalRun( @NonNull WorkerExecutorFacade workers, @NonNull Map<File, FileStatus> changedInput) throws IOException { Set<File> jarsToProcess = classesToFix.stream().filter(File::isFile).collect(Collectors.toSet()); Map<File, FileStatus> inputToProcess = changedInput .entrySet() .stream() .filter( e -> e.getValue() == FileStatus.REMOVED || jarsToProcess.contains(e.getKey())) .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); processFiles(workers, inputToProcess); } FixStackFramesDelegate(
            @NonNull Set<File> bootClasspath,
            @NonNull Set<File> classesToFix,
            @NonNull Set<File> referencedClasses,
            @NonNull File outFolder,
            @Nullable FileCache userCache); void doFullRun(@NonNull WorkerExecutorFacade workers); void doIncrementalRun(
            @NonNull WorkerExecutorFacade workers, @NonNull Map<File, FileStatus> changedInput);  }### Answer:
@Test public void testIncrementalBuilds() throws IOException { Path jar = getJarWithBrokenClasses("input.jar", ImmutableList.of("test/A")); Set<File> classesToFix = ImmutableSet.of(jar.toFile()); FixStackFramesDelegate delegate = new FixStackFramesDelegate( ANDROID_JAR, classesToFix, classesToFix, output, null); delegate.doIncrementalRun(executor, ImmutableMap.of()); assertThat(output.list()).named("output artifacts").hasLength(0); delegate.doIncrementalRun(executor, ImmutableMap.of(jar.toFile(), FileStatus.NEW)); assertThat(output.list()).named("output artifacts").hasLength(1); FileUtils.delete(jar.toFile()); delegate.doIncrementalRun(executor, ImmutableMap.of(jar.toFile(), FileStatus.REMOVED)); assertThat(output.list()).named("output artifacts").hasLength(0); }