AuditFilter implements Filter { public static void audit(String who, String fromAddress, String whatRequest, String fromHost, String whatURL, String whatAddrs, String whenISO9601) { AUDIT_LOG.info("Audit: {}/{}-{} performed request {} {} ({}) at time {}", who, fromAddress, fromHost, whatRequest, whatURL, whatAddrs, whenISO9601); }  @Override void init(FilterConfig filterConfig); @Override void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain); static void audit(String who, String fromAddress, String whatRequest, String fromHost, String whatURL, String whatAddrs,
            String whenISO9601); static void recordMetrics(); @Override void destroy();  }
@Test public void testAudit() throws IOException, ServletException { AtlasRepositoryConfiguration.resetExcludedOperations(); when(servletRequest.getRequestURL()).thenReturn(new StringBuffer("api/atlas/types")); when(servletRequest.getMethod()).thenReturn("GET"); AuditFilter auditFilter = new AuditFilter(); auditFilter.doFilter(servletRequest, servletResponse, filterChain); verify(filterChain).doFilter(servletRequest, servletResponse); assertFalse(auditFilter.isOperationExcludedFromAudit("GET", "Version", configuration)); assertFalse(auditFilter.isOperationExcludedFromAudit("GET", "Ping", configuration)); assertFalse(auditFilter.isOperationExcludedFromAudit("GET", "Types", configuration)); }