### Question:
HibernateDocumentHistoryDAO extends HibernatePersistentObjectDAO<DocumentHistory> implements DocumentHistoryDAO { @Override public List<DocumentHistory> 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<DocumentHistory>(); } } private  HibernateDocumentHistoryDAO(); List<DocumentHistory> findByDocId(long docId); @Override List<DocumentHistory> findByDocIdAndEvent(long docId, String event); List<DocumentHistory> findByUserId(long userId); List<DocumentHistory> findByFolderId(long folderId); @Override List<DocumentHistory> findNotNotified(Integer max); @Override void cleanOldHistories(int ttl); @Override List<DocumentHistory> findByUserIdAndEvent(long userId, String event, String sessionId); @Override void markHistoriesAsRead(String event, long userId); @Override boolean store(DocumentHistory history); @Override List<DocumentHistory> findByPath(String pathExpression, Date olderDate, Collection<String> events,
			Integer max);  }### Answer:
@SuppressWarnings("rawtypes") @Test public void testFindNotNotified() throws PersistenceException { Collection histories = dao.findNotNotified(null); Assert.assertNotNull(histories); Assert.assertEquals(4, histories.size()); DocumentHistory history = dao.findById(1); dao.initialize(history); history.setNotified(1); dao.store(history); histories = dao.findNotNotified(null); Assert.assertNotNull(histories); Assert.assertEquals(3, histories.size()); }