@SuppressWarnings("unchecked")
@Test public void testMultipleEntryMultiplePostingSingleFile() throws Exception
{
List<Posting> postings1 = new ArrayList<Posting>();
postings1.add(new BasicPostingImpl(1,1));
postings1.add(new BasicPostingImpl(2,2));
postings1.add(new BasicPostingImpl(1000,1000));
List<Posting> postings2 = new ArrayList<Posting>();
postings2.add(new BasicPostingImpl(1,4));
postings2.add(new BasicPostingImpl(2,4));
postings2.add(new BasicPostingImpl(1000,4));
List<BitIndexPointer> pointerList = new ArrayList<BitIndexPointer>();
String filename = PostingTestUtils.writePostingsToFile(new Iterator[]{postings1.iterator(), postings2.iterator()}, pointerList);
BitPostingIndex structure = new BitPostingIndex(filename, (byte) 1, BasicIterablePosting.class, "file", 0);
PostingTestUtils.comparePostings(postings1, structure.getPostings(pointerList.get(0)));