public int getInt(Object obj) {
    return Platform.UNSAFE.getInt(obj, fieldOffset);
  }
@Test
  public void testRepeatedFields() {
    assertEquals(new UnsafeFieldAccessor(A.class, "f1").getInt(new A()), 1);
    assertEquals(new UnsafeFieldAccessor(A.class, "f2").getInt(new A()), 2);
    assertEquals(new UnsafeFieldAccessor(B.class, "f1").getInt(new B()), 2);
    assertEquals(new UnsafeFieldAccessor(B.class, "f2").getInt(new B()), 2);
  }