RequestLoggingFilter extends OncePerRequestFilter { public void setMaxPayloadLength(Integer maxPayloadLength) { this.maxPayloadLength = maxPayloadLength; }  void setIncludeQueryString(boolean includeQueryString); void setIncludeClientInfo(boolean includeClientInfo); void setIncludePayload(boolean includePayload); void setMaxPayloadLength(Integer maxPayloadLength); void setLogMessagePrefix(String logMessagePrefix); void setLogMessageSuffix(String logMessageSuffix); static final String DEFAULT_LOG_MESSAGE_PREFIX; static final String DEFAULT_LOG_MESSAGE_SUFFIX; static final String AFTER_REQUEST_LOG_MESSAGE_PREFIX; }
@Test public void testDoFilterMaxPayloadLength() throws Exception { RequestLoggingFilter requestLoggingFilter = new RequestLoggingFilter(); requestLoggingFilter.setMaxPayloadLength(4); requestLoggingFilter.doFilter(createServletRequest(), createServletResponse(), createFilterChain()); }