### Question:
HibernateFolderHistoryDAO extends HibernatePersistentObjectDAO<FolderHistory> implements FolderHistoryDAO { @Override public List<FolderHistory> findNotNotified(Integer max) { try { return findByWhere("_entity.notified = 0", "order by _entity.date asc", max); } catch (PersistenceException e) { log.error(e.getMessage(), e); return new ArrayList<FolderHistory>(); } } private  HibernateFolderHistoryDAO(); @Override List<FolderHistory> findByUserId(long userId); @Override List<FolderHistory> findByFolderId(long folderId); @Override List<FolderHistory> findNotNotified(Integer max); @Override void cleanOldHistories(int ttl); @Override List<FolderHistory> findByUserIdAndEvent(long userId, String event); @Override boolean store(FolderHistory entity); @Override List<FolderHistory> findByPath(String pathExpression, Date olderDate, Collection<String> events,
			Integer max); @Override List<FolderHistory> findByFolderIdAndEvent(long folderId, String event, Date oldestDate);  }### Answer:
@SuppressWarnings("rawtypes") @Test public void testFindNotNotified() throws PersistenceException { Collection histories = dao.findNotNotified(null); Assert.assertNotNull(histories); Assert.assertEquals(2, histories.size()); FolderHistory history = dao.findById(3); dao.initialize(history); history.setNotified(1); dao.store(history); histories = dao.findNotNotified(null); Assert.assertNotNull(histories); Assert.assertEquals(1, histories.size()); }