public void testLoadDeepIdentityScope() {
   RelationEntity entity = insertEntityWithRelations(42l);
   RelationEntity entity2 = dao.loadDeep(entity.getId());
   RelationEntity entity3 = dao.loadDeep(entity.getId());
   assertSame(entity, entity2);
   assertSame(entity, entity3);
   assertTestEntity(entity);
 }
 public void testToQueryDeepIdentityScope() {
   insertEntityWithRelations(42l);
   RelationEntity entity2 = insertEntityWithRelations(42l);
   String columnName = RelationEntityDao.Properties.SimpleString.columnName;
   List<RelationEntity> entityList = dao.queryDeep("WHERE T." + columnName + "=?", "findMe");
   assertEquals(2, entityList.size());
   RelationEntity entity = entityList.get(0);
   assertTestEntity(entity);
   entity2 = entityList.get(1);
   assertTestEntity(entity2);
   assertSame(entity.getTestEntity(), entity2.getTestEntity());
 }
 public void testToOneLoadDeepIdentityScope() {
   RelationEntity entity = insertEntityWithRelations(42l);
   RelationEntity entity2 = insertEntityWithRelations(42l);
   entity = dao.loadDeep(entity.getId());
   entity2 = dao.loadDeep(entity2.getId());
   assertFalse(entity.getId().equals(entity2.getId()));
   assertTestEntity(entity);
   assertTestEntity(entity2);
   assertSame(entity.getTestEntity(), entity2.getTestEntity());
 }