LogEntryDAOMysqlImpl extends AbstractTableCreatingDAOImpl implements LogEntryDAO { public int getNumberOfLogEntriesForTenant(int tenantId) { return getNumberOfLogEntriesForTenant.run(tenantId); } 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+all_ended.xml") public void getNumberOfLogEntries_shouldReturnNumberOfLogEntriesOrZero() { assertThat(logEntryDAO.getNumberOfLogEntriesForTenant(1), is(2)); assertThat(logEntryDAO.getNumberOfLogEntriesForTenant(2), is(1)); assertThat(logEntryDAO.getNumberOfLogEntriesForTenant(3), is(0)); }