public void testSkipToEndOfList() throws ConfigurationException, SecurityException, IOException, URISyntaxException, ClassNotFoundException, InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException {
String basename = File.createTempFile( getClass().getSimpleName(), "test" ).getCanonicalPath();
new IndexBuilder( basename, new StringArrayDocumentCollection( new String[] { "a", "a", "c" } ) ).run();
Index index = DiskBasedIndex.getInstance( basename + "-text", true, true );
IndexIterator indexIterator = index.documents( "a" );
assertEquals( Integer.MAX_VALUE, indexIterator.skipTo( Integer.MAX_VALUE ) );
indexIterator.dispose();
indexIterator = index.documents( "a" );
assertEquals( 0, indexIterator.skipTo( 0 ) );