@Test
public void testTTLReadBack() {
if (FactorySingleton.getServerType() == DbTypeEnum.HBASE || FactorySingleton.getServerType() == DbTypeEnum.MONGODB)
return;
ExpiringEntity entity = new ExpiringEntity();
entity.setId(50);
entity.setName("test1");
entity.setTtl(50000);
mgr.put(entity);
mgr.flush();
// read entity back
mgr.clear();
entity = mgr.find(ExpiringEntity.class, 50L);
assertEquals("TTL not read back correctly", 50000, entity.getTtl());
}