What Robin means is, you need to test that the filter include ran:

  final AtomicBoolean filterRan = new AtomicBoolean();
  RevFilter testFilter = ... 
    assertNotNull(cmit.getRawBuffer());
    filterRan.set(true);


  filterRan.set(false);
  ... do the walk ...
  assertTrue("filter ran", filterRan.get());

This way the test fails if include() did not get invoked.

Also, I think you need to dispose of the commit in the first while loop, otherwise the test will still pass without your bug fix.