### Question:
DefaultBuildContext extends AbstractBuildContext implements BuildContext { @Override public Collection<DefaultResource<File>> registerAndProcessInputs(File basedir, Collection<String> includes, Collection<String> excludes) throws IOException { return super.registerAndProcessInputs(basedir, includes, excludes); } DefaultBuildContext(BuildContextEnvironment configuration); protected  DefaultBuildContext(Workspace workspace, File stateFile,
      Map<String, Serializable> configuration, BuildContextFinalizer finalizer); @Override Collection<DefaultResource<File>> registerAndProcessInputs(File basedir,
      Collection<String> includes, Collection<String> excludes); @Override void markSkipExecution(); @Override DefaultResourceMetadata<File> registerInput(File inputFile); @Override Collection<DefaultResourceMetadata<File>> registerInputs(File basedir,
      Collection<String> includes, Collection<String> excludes);  }### Answer:
@Test public void testRegisterAndProcessInputs() throws Exception { File inputFile = temp.newFile("inputFile"); File outputFile = temp.newFile("outputFile"); List<String> includes = Arrays.asList("**/" + inputFile.getName()); TestBuildContext context = newBuildContext(); List<DefaultResource<File>> inputs = toList(context.registerAndProcessInputs(temp.getRoot(), includes, null)); Assert.assertEquals(1, inputs.size()); Assert.assertEquals(ResourceStatus.NEW, inputs.get(0).getStatus()); inputs.get(0).associateOutput(outputFile); context.commit(); context = newBuildContext(); inputs = toList(context.registerAndProcessInputs(temp.getRoot(), includes, null)); Assert.assertEquals(0, inputs.size()); context.commit(); }