@Test
public void testFindFid() throws Exception {

    long offset = reader.findFid(TYPE_NAME + ".4");
    assertEquals(3, offset);
    offset = reader.findFid(TYPE_NAME + ".1");
    assertEquals(0, offset);
    // test if the fid is too high
    offset = reader.findFid(TYPE_NAME + ".10000000");
    assertEquals(-1, offset);
    // test if the fid is negative
    offset = reader.findFid(TYPE_NAME + ".-1");
    assertEquals(-1, offset);
    // test if the fid does not match the <typeName>.<long> pattern
    offset = reader.findFid(TYPE_NAME + ".1ABC");
    assertEquals(-1, offset);
    offset = reader.findFid("prefix" + TYPE_NAME + ".1");
    assertEquals(-1, offset);
}