@Test public void testShouldLogForStatusIsForwardedToLogTimingStrategy() { when(mockLogTimingStrategy.shouldLogForStatus(any(Status.class))).thenReturn(true, false); boolean first = auditor.shouldLogForStatus(Status.ATTEMPT); boolean second = auditor.shouldLogForStatus(Status.SUCCEEDED); assertThat(first).isTrue(); assertThat(second).isFalse(); verify(mockLogTimingStrategy).shouldLogForStatus(Status.ATTEMPT); verify(mockLogTimingStrategy).shouldLogForStatus(Status.SUCCEEDED); }
@Override public boolean shouldLogForStatus(Status status) { return logTimingStrategy.shouldLogForStatus(status); }
DefaultAuditor implements Auditor { @Override public boolean shouldLogForStatus(Status status) { return logTimingStrategy.shouldLogForStatus(status); } }
DefaultAuditor implements Auditor { @Override public boolean shouldLogForStatus(Status status) { return logTimingStrategy.shouldLogForStatus(status); } DefaultAuditor(AuditLogger logger, AuditFilter filter, AuditObfuscator obfuscator, LogTimingStrategy logTimingStrategy);   DefaultAuditor(AuditLogger logger, AuditFilter filter, AuditObfuscator obfuscator, AuditMetrics auditMetrics, LogTimingStrategy logTimingStrategy); }
DefaultAuditor implements Auditor { @Override public boolean shouldLogForStatus(Status status) { return logTimingStrategy.shouldLogForStatus(status); } DefaultAuditor(AuditLogger logger, AuditFilter filter, AuditObfuscator obfuscator, LogTimingStrategy logTimingStrategy);   DefaultAuditor(AuditLogger logger, AuditFilter filter, AuditObfuscator obfuscator, AuditMetrics auditMetrics, LogTimingStrategy logTimingStrategy); @Override void setup(); @Override void audit(AuditEntry logEntry); @Override boolean shouldLogForStatus(Status status); @Override boolean shouldLogFailedBatchSummary(); @Override void setLogTimingStrategy(LogTimingStrategy logTimingStrategy); @Override void addLogger(AuditLogger logger); @Override void removeLogger(AuditLogger logger); }
DefaultAuditor implements Auditor { @Override public boolean shouldLogForStatus(Status status) { return logTimingStrategy.shouldLogForStatus(status); } DefaultAuditor(AuditLogger logger, AuditFilter filter, AuditObfuscator obfuscator, LogTimingStrategy logTimingStrategy);   DefaultAuditor(AuditLogger logger, AuditFilter filter, AuditObfuscator obfuscator, AuditMetrics auditMetrics, LogTimingStrategy logTimingStrategy); @Override void setup(); @Override void audit(AuditEntry logEntry); @Override boolean shouldLogForStatus(Status status); @Override boolean shouldLogFailedBatchSummary(); @Override void setLogTimingStrategy(LogTimingStrategy logTimingStrategy); @Override void addLogger(AuditLogger logger); @Override void removeLogger(AuditLogger logger);  }