@Test public void testTest() throws Exception { AuditLogEntryFilter auditLogEntryFilter = new AuditLogEntryFilter(); HashMap<String, Boolean> testCases = new HashMap<>(); testCases.put("firstname=john", true); testCases.put("lastname=duck", false); testCases.put("user=oh", true); testCases.put("username=oh", true); testCases.put("userid=doe", true); testCases.put("mail=wasabi@example.com", false); testCases.put("action=experiment", false); testCases.put("experiment=RedButton", true); testCases.put("bucket=A", true); testCases.put("app=testApp", false); testCases.put("time=Summer", false); testCases.put("attribute=alloc", true); testCases.put("before=100", true); testCases.put("after=new value", false); testCases.put("description=some description", false); testCases.put("john", true); testCases.put("john,experiment=Experience", true); for (Map.Entry<String, Boolean> testCase : testCases.entrySet()) { auditLogEntryFilter.replaceFilter(testCase.getKey(), "+0000"); Assert.assertEquals("test case " + testCase.getKey() + " failed.", testCase.getValue(), auditLogEntryFilter.test(auditLogEntry)); } }
@Override public boolean test(AuditLogEntry auditLogEntry) { return super.test(auditLogEntry, Property.class); }
AuditLogEntryFilter extends PaginationFilter<AuditLogEntry> { @Override public boolean test(AuditLogEntry auditLogEntry) { return super.test(auditLogEntry, Property.class); } }
AuditLogEntryFilter extends PaginationFilter<AuditLogEntry> { @Override public boolean test(AuditLogEntry auditLogEntry) { return super.test(auditLogEntry, Property.class); } AuditLogEntryFilter(); }
AuditLogEntryFilter extends PaginationFilter<AuditLogEntry> { @Override public boolean test(AuditLogEntry auditLogEntry) { return super.test(auditLogEntry, Property.class); } AuditLogEntryFilter(); @Override boolean test(AuditLogEntry auditLogEntry); }
AuditLogEntryFilter extends PaginationFilter<AuditLogEntry> { @Override public boolean test(AuditLogEntry auditLogEntry) { return super.test(auditLogEntry, Property.class); } AuditLogEntryFilter(); @Override boolean test(AuditLogEntry auditLogEntry);  }