@Test public void testStatusToAuthenticationOperation() { Status mockStatus = mock(Status.class); when(mockStatus.getDisplayName()).thenReturn("OK"); SimpleAuditOperation operation = AuditAdapter.statusToAuthenticationOperation(mockStatus); assertThat(operation.getOperationString()).isEqualTo("Authentication OK"); }
static SimpleAuditOperation statusToAuthenticationOperation(Status status) { return new SimpleAuditOperation("Authentication " + status.getDisplayName()); }
AuditAdapter { static SimpleAuditOperation statusToAuthenticationOperation(Status status) { return new SimpleAuditOperation("Authentication " + status.getDisplayName()); } }
AuditAdapter { static SimpleAuditOperation statusToAuthenticationOperation(Status status) { return new SimpleAuditOperation("Authentication " + status.getDisplayName()); } AuditAdapter(Auditor auditor, AuditEntryBuilderFactory entryBuilderFactory, BoundValueSuppressor boundValueSuppressor); }
AuditAdapter { static SimpleAuditOperation statusToAuthenticationOperation(Status status) { return new SimpleAuditOperation("Authentication " + status.getDisplayName()); } AuditAdapter(Auditor auditor, AuditEntryBuilderFactory entryBuilderFactory, BoundValueSuppressor boundValueSuppressor); static AuditAdapter getInstance(); void setup(); void auditRegular(String operation, ClientState state, Status status, long timestamp); void auditPrepared(MD5Digest id, CQLStatement statement, ClientState state, QueryOptions options, Status status, long timestamp); void auditBatch(BatchStatement statement, UUID uuid, ClientState state, BatchQueryOptions options, Status status, long timestamp); void auditAuth(String username, Status status, long timestamp); void auditAuth(String userName, String subject, Status status, long timestamp); void mapIdToQuery(MD5Digest id, String query); Auditor getAuditor(); @VisibleForTesting void setBoundValueSuppressor(BoundValueSuppressor suppressor); @VisibleForTesting BoundValueSuppressor getBoundValueSuppressor(); }
AuditAdapter { static SimpleAuditOperation statusToAuthenticationOperation(Status status) { return new SimpleAuditOperation("Authentication " + status.getDisplayName()); } AuditAdapter(Auditor auditor, AuditEntryBuilderFactory entryBuilderFactory, BoundValueSuppressor boundValueSuppressor); static AuditAdapter getInstance(); void setup(); void auditRegular(String operation, ClientState state, Status status, long timestamp); void auditPrepared(MD5Digest id, CQLStatement statement, ClientState state, QueryOptions options, Status status, long timestamp); void auditBatch(BatchStatement statement, UUID uuid, ClientState state, BatchQueryOptions options, Status status, long timestamp); void auditAuth(String username, Status status, long timestamp); void auditAuth(String userName, String subject, Status status, long timestamp); void mapIdToQuery(MD5Digest id, String query); Auditor getAuditor(); @VisibleForTesting void setBoundValueSuppressor(BoundValueSuppressor suppressor); @VisibleForTesting BoundValueSuppressor getBoundValueSuppressor();  }