@Test
public void testSetPrimaryKey() throws Exception {

    MyEntity entity = new MyEntity();
    KeyHolder.setPrimaryKey(MyEntity.class.getDeclaredField("bif"), entity, null);
    Assert.assertNull(entity.bif);
    KeyHolder.setPrimaryKey(MyEntity.class.getDeclaredField("lf"), entity, 1);
    Assert.assertEquals(1, entity.lf);
    KeyHolder.setPrimaryKey(MyEntity.class.getDeclaredField("intf"), entity, 1);
    Assert.assertEquals(1, entity.intf);
    KeyHolder.setPrimaryKey(MyEntity.class.getDeclaredField("bytef"), entity, 1);
    Assert.assertEquals(1, entity.bytef);
    KeyHolder.setPrimaryKey(MyEntity.class.getDeclaredField("shf"), entity, 1);
    Assert.assertEquals(1, entity.shf);
    KeyHolder.setPrimaryKey(MyEntity.class.getDeclaredField("bif"), entity, 1);
    Assert.assertEquals(BigInteger.valueOf(1), entity.bif);
}