### Question:
TrimFilter implements Filter { @Override public void init(FilterConfig filterConfig) throws ServletException { this.wrappedTrimFilter.init(filterConfig); this.excludePatterns = filterConfig.getInitParameter(EXCLUDE_PATTERNS_INIT_PARAMETER); } TrimFilter();  TrimFilter(Filter wrappedTrimFilter); @Override void init(FilterConfig filterConfig); @Override void doFilter(ServletRequest request, ServletResponse response, FilterChain chain); @Override void destroy();  }### Answer:
@Test public void testInit() throws ServletException { FilterConfig filterConfig = Mockito.mock(FilterConfig.class); trimFilter.init(filterConfig); Mockito.verify(wrappedTrimFilter).init(filterConfig); Mockito.verify(filterConfig).getInitParameter(TrimFilter.EXCLUDE_PATTERNS_INIT_PARAMETER); }