@Test(expected = RepositoryException.class) public void testGetCompleteEntryThrowsException() { when(accessor.getCompleteAuditLogEntryList()) .thenThrow(new RuntimeException("testException")); List<AuditLogEntry> result = repository.getCompleteAuditLogEntryList(); }
@Override public List<AuditLogEntry> getCompleteAuditLogEntryList() { LOGGER.debug("Getting complete audit log entries"); try { Result<AuditLog> result = accessor.getCompleteAuditLogEntryList(); return makeAuditLogEntries(result.all()); } catch (Exception e) { LOGGER.error("Error while getting audit log entries list", e); throw new RepositoryException( "Unable to receive complete audit log entry list"); } }
CassandraAuditLogRepository implements AuditLogRepository { @Override public List<AuditLogEntry> getCompleteAuditLogEntryList() { LOGGER.debug("Getting complete audit log entries"); try { Result<AuditLog> result = accessor.getCompleteAuditLogEntryList(); return makeAuditLogEntries(result.all()); } catch (Exception e) { LOGGER.error("Error while getting audit log entries list", e); throw new RepositoryException( "Unable to receive complete audit log entry list"); } } }
CassandraAuditLogRepository implements AuditLogRepository { @Override public List<AuditLogEntry> getCompleteAuditLogEntryList() { LOGGER.debug("Getting complete audit log entries"); try { Result<AuditLog> result = accessor.getCompleteAuditLogEntryList(); return makeAuditLogEntries(result.all()); } catch (Exception e) { LOGGER.error("Error while getting audit log entries list", e); throw new RepositoryException( "Unable to receive complete audit log entry list"); } } @Inject  CassandraAuditLogRepository(AuditLogAccessor accessor); }
CassandraAuditLogRepository implements AuditLogRepository { @Override public List<AuditLogEntry> getCompleteAuditLogEntryList() { LOGGER.debug("Getting complete audit log entries"); try { Result<AuditLog> result = accessor.getCompleteAuditLogEntryList(); return makeAuditLogEntries(result.all()); } catch (Exception e) { LOGGER.error("Error while getting audit log entries list", e); throw new RepositoryException( "Unable to receive complete audit log entry list"); } } @Inject  CassandraAuditLogRepository(AuditLogAccessor accessor); @Override List<AuditLogEntry> getCompleteAuditLogEntryList(); @Override List<AuditLogEntry> getCompleteAuditLogEntryList(int limit); @Override List<AuditLogEntry> getAuditLogEntryList(
            Application.Name applicationName); @Override List<AuditLogEntry> getAuditLogEntryList(
            Application.Name applicationName, int limit); @Override List<AuditLogEntry> getGlobalAuditLogEntryList(); @Override List<AuditLogEntry> getGlobalAuditLogEntryList(int limit); @Override boolean storeEntry(AuditLogEntry entry); }
CassandraAuditLogRepository implements AuditLogRepository { @Override public List<AuditLogEntry> getCompleteAuditLogEntryList() { LOGGER.debug("Getting complete audit log entries"); try { Result<AuditLog> result = accessor.getCompleteAuditLogEntryList(); return makeAuditLogEntries(result.all()); } catch (Exception e) { LOGGER.error("Error while getting audit log entries list", e); throw new RepositoryException( "Unable to receive complete audit log entry list"); } } @Inject  CassandraAuditLogRepository(AuditLogAccessor accessor); @Override List<AuditLogEntry> getCompleteAuditLogEntryList(); @Override List<AuditLogEntry> getCompleteAuditLogEntryList(int limit); @Override List<AuditLogEntry> getAuditLogEntryList(
            Application.Name applicationName); @Override List<AuditLogEntry> getAuditLogEntryList(
            Application.Name applicationName, int limit); @Override List<AuditLogEntry> getGlobalAuditLogEntryList(); @Override List<AuditLogEntry> getGlobalAuditLogEntryList(int limit); @Override boolean storeEntry(AuditLogEntry entry);  }