@Test
public void testRemove() throws MalformedURLException, IOException {

    FidIndexer.generate(backshp.toURI().toURL());
    initWriter();
    writer.next();
    writer.remove();
    for( int i = 2, j = indexFile.getRecordCount(); i < j; i++ ) {
        assertTrue(writer.hasNext());
        assertEquals((long) i, writer.next());
    }
    writer.write();
    close();
    initWriter();
    for( int i = 1, j = indexFile.getRecordCount() - 1; i < j; i++ ) {
        assertTrue(writer.hasNext());
        assertEquals((long) i + 1, writer.next());
    }
}