@Test
public void testGetSplits() throws IOException, InterruptedException {

  SingleFieldDocument doc1 = new SingleFieldDocument("1", "This is simple document 1");
  SingleFieldDocument doc2 = new SingleFieldDocument("2", "This is simple document 2");
  SingleFieldDocument doc3 = new SingleFieldDocument("3", "This is simple document 3");
  //generate 3 segments
  commitDocuments(getDirectory(getIndexPath1AsFile()), doc1);
  commitDocuments(getDirectory(getIndexPath1AsFile()), doc2);
  commitDocuments(getDirectory(getIndexPath1AsFile()), doc3);
  List<LuceneSegmentInputSplit> splits = inputFormat.getSplits(jobContext);
  Assert.assertEquals(3, splits.size());
}