//now check correct type of all structures
BitPostingIndexInputStream bpiis;
IterablePosting ip;
BitPostingIndex bpi;
//check stream structures
bpiis = (BitPostingIndexInputStream) index.getIndexStructureInputStream("direct");
ip = bpiis.next();
assertTrue(ip instanceof FieldPosting);
bpiis = (BitPostingIndexInputStream) index.getIndexStructureInputStream("inverted");
ip = bpiis.next();
assertTrue(ip instanceof FieldPosting);
//check random structures
bpi = (BitPostingIndex) index.getInvertedIndex();
ip = bpi.getPostings((BitIndexPointer) index.getLexicon().getLexiconEntry(0).getValue());
assertTrue(ip instanceof FieldPosting);
bpi = (BitPostingIndex) index.getDirectIndex();
ip = bpi.getPostings((BitIndexPointer) index.getDocumentIndex().getDocumentEntry(0));
assertTrue(ip instanceof FieldPosting);
}