@Test
public void testGetSegment() throws Exception {

  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");
  List<SingleFieldDocument> docs = asList(doc1, doc2, doc3);
  for (SingleFieldDocument doc : docs) {
    commitDocuments(getDirectory(getIndexPath1AsFile()), doc);
  }
  assertSegmentContainsOneDoc("_0");
  assertSegmentContainsOneDoc("_1");
  assertSegmentContainsOneDoc("_2");
}