@Test
public void getRetainedEntitiesCountTest() {

    TestEntity entity2 = context.createEntity();
    entity.retain(new Object());
    context.destroyEntity(entity);
    assertEquals(1, context.getRetainedEntitiesCount());
    context.destroyEntity(entity2);
    assertEquals(1, context.getRetainedEntitiesCount());
}