@Override
    public <T> T persist(T detachedObject) {
        Map<Object, Object> alreadyPersisted = new HashMap<Object, Object>();
        return persist(detachedObject, alreadyPersisted, RCascadeType.PERSIST);
    }
@Test
    public void testPersist() {
        RLiveObjectService service = redisson.getLiveObjectService();

        TestClass ts = new TestClass(new ObjectId(100));
        ts.setValue("VALUE");
        ts.setContent(new TestREntity("123"));
        ts.addEntry("1", "2");
        TestClass persisted = service.persist(ts);

        assertEquals(3, redisson.getKeys().count());
        assertEquals(1, persisted.getValues().size());
        assertEquals("123", ((TestREntity)persisted.getContent()).getName());
        assertEquals(new ObjectId(100), persisted.getId());
        assertEquals("VALUE", persisted.getValue());
        try {
            service.persist(ts);
            fail("Should not be here");
        } catch (Exception e) {
            assertEquals("This REntity already exists.", e.getMessage());
        }
    }