@Test
public void testCustomScanner()
{

  MyScanner scanner = new MyScanner();
  scanner.setPartitionCount(2);
  scanner.setPartitionIndex(1);
  boolean accepted = scanner.acceptFile("1_file");
  Assert.assertTrue("File should be accepted by this partition ", accepted);
  scanner.setPartitionIndex(0);
  accepted = scanner.acceptFile("1_file");
  Assert.assertFalse("File should not be accepted by this partition ", accepted);
}