### Question:
CustomFilterAdapter implements Filter, CustomFilterAdapterListener { @Override public void init(final FilterConfig newFilterConfig) throws ServletException { LOG.info("Initializing CustomFilterAdapter"); this.filterConfig = newFilterConfig; customFilterAdapterConfig.registerCustomFilterAdapterConfigurationListener(CustomFilterAdapter.this); } CustomFilterAdapter(CustomFilterAdapterConfiguration customFilterAdapterConfig); @Override void destroy(); @Override void doFilter(final ServletRequest request, final ServletResponse response, final FilterChain chain); @Override void init(final FilterConfig newFilterConfig); @Override void updateInjectedFilters(final List<Filter> injectedFilters); @Override FilterConfig getFilterConfig();  }### Answer:
@Test public void testInit() throws Exception { final CustomFilterAdapter customFilterAdapter = new CustomFilterAdapter(mockAdapterConfig); customFilterAdapter.init(null); assertNull(customFilterAdapter.getFilterConfig()); final FilterConfig filterConfig = new FilterConfig() { @Override public String getFilterName() { return null; } @Override public ServletContext getServletContext() { return null; } @Override public String getInitParameter(final String string) { return null; } @Override public Enumeration<String> getInitParameterNames() { return null; } }; customFilterAdapter.init(filterConfig); assertEquals(filterConfig, customFilterAdapter.getFilterConfig()); customFilterAdapter.destroy(); }