LogEntryDAOMysqlImpl extends AbstractTableCreatingDAOImpl implements LogEntryDAO { public void endAllEntries(Date endDate) { Preconditions.checkNotNull(endDate); endAllEntries.update(endDate, FORCED_END_MARSHALED); } protected  LogEntryDAOMysqlImpl(DataSource dataSource, SqlScriptService sqlScriptService,
                                   PluginRegistry pluginRegistry); @Override String getDefaultTableName(); @Override String getTableCreatingSQLScriptName(); void startEntry(LogEntry entry); void endEntry(LogEntry entry); void endAllEntries(Date endDate); void endAllEntries(); void deleteEntry(LogEntry entry); List<Integer> getRunningTenants(); List<LogEntry> getLogEntries(int offset, int limit); List<LogEntry> getLogEntriesForTenant(int tenantId, int offset, int limit); List<LogEntry> getLogEntries(int assocTypeId, int offset, int limit); List<LogEntry> getLogEntriesForTenant(int tenantId, int assocTypeId, int offset, int limit); int getNumberOfLogEntries(); int getNumberOfLogEntriesForTenant(int tenantId); void deleteLogEntries(); int getComputationDurationForDate(Date date); int getComputationDurationForDate();  }
@Test @DataSet("/dbunit/pluginContainer/plugin_log+1new_started.xml") @ExpectedDataSet("/dbunit/pluginContainer/plugin_log+all_ended_sameEndDate.xml") public void endAllEntries_shouldEndAllEntries() { logEntryDAO.endAllEntries(date("2011-02-23 18:00:00")); }
@Test(expected = NullPointerException.class) public void endAllEntries_shouldThrowOnNullEndDate() { logEntryDAO.endAllEntries(null); }