assertNotNull(txt);
}
public void testRemoveIndexTypeLead() throws Exception{
Document doc1 = new Document();
doc1.add(new Field(DocumentCreator.FIELD_BOOKMARK_ID,"100",Field.Store.YES,Field.Index.UN_TOKENIZED));
doc1.add(new Field(DocumentCreator.FIELD_INDEX_TYPE,DocumentCreator.INDEX_TYPE_LEAD,Field.Store.NO,Field.Index.UN_TOKENIZED));
doc1.add(new Field(DocumentCreator.FIELD_INDEX_TYPE,"other-type",Field.Store.NO,Field.Index.UN_TOKENIZED));
doc1 = DocumentCreator.removeIndexTypeLead(doc1);
Field[] fields = doc1.getFields(DocumentCreator.FIELD_INDEX_TYPE);
assertEquals(1,fields.length);
assertEquals("other-type",fields[0].stringValue());
fields = doc1.getFields(DocumentCreator.FIELD_BOOKMARK_ID);