### Question:
BaseEntityDao extends BaseDao implements IBaseEntityDao<T> { @Override public T findByUniqueProperty(String propertyName, Object value) throws EntityException { return findByUniqueProperty(getEntityClass(), propertyName, value); } BaseEntityDao(); @Override BaseEntityDao<T> getSubClassEntityDao(Class<T> entityClass); @Override T findEntity(final Serializable id); @Override T findEntity(Class<T> entityClass, final Serializable id); @Override void saveEntity(T entity); @Override void saveOrUpdateEntity(T entity); @Override void updateEntity(T entity); @Override void deleteEntity(T entity); @Override List<T> findByExample(T entity); @Override void deleteEntity(Serializable id); @Override List<T> findAll(); @Override List<T> findByProperty(String propertyName, Object value); @Override List<T> findByProperty(Class<T> entityClass, String propertyName, Object value); @Override T findByUniqueProperty(String propertyName, Object value); @Override T findByUniqueProperty(Class<T> entityClass, String propertyName, Object value);  }### Answer:
@Test public void testFindByUniquePropertyClassOfTStringObject() throws EntityException { for (String userId : userMap.keySet()) { TLogInfo entity = baseEntityDao.findByUniqueProperty(TLogInfo.class, "id", userId); assertNotNull("findByUniqueProperty方法加载对象，未找到指定主键的对象错误！", entity); } TLogInfo entity = baseEntityDao.findByUniqueProperty(TLogInfo.class, "id", "1"); assertNull("findByUniqueProperty方法加载对象，找到指定主键的对象错误！", entity); }
@Test public void testFindByUniquePropertyStringObject() { for (String userId : userMap.keySet()) { try { baseEntityDao.findByUniqueProperty("id", userId); } catch (EntityException e) { logger.info(e.getMessage()); break; } } }
@Test public void testDeleteEntitySerializable() { for (String id : userMap.keySet()) { try { baseEntityDao.findByUniqueProperty("id", id); } catch (EntityException e) { logger.info(e.getMessage()); break; } } }