### Question:
DefaultFilterManager extends BaseModuleManager implements FilterManager { @Override public List< PageFilter > getFilterList() { return m_pageFilters; } DefaultFilterManager( final Engine engine, final Properties props ); @Override void addPageFilter( final PageFilter f, final int priority ); @Override String doPreTranslateFiltering( final Context context, String pageData ); @Override String doPostTranslateFiltering( final Context context, String htmlData ); @Override String doPreSaveFiltering( final Context context, String pageData ); @Override void doPostSaveFiltering( final Context context, final String pageData ); @Override List< PageFilter > getFilterList(); @Override void destroy(); void fireEvent( final int type, final Context context ); @Override Collection< WikiModuleInfo > modules(); @Override PageFilterInfo getModuleInfo( final String moduleName );  }### Answer:
@Test public void testInitFilters() throws Exception { final FilterManager m = new DefaultFilterManager( engine, props ); final List<PageFilter> l = m.getFilterList(); Assertions.assertEquals( 2, l.size(), "Wrong number of filters" ); final Iterator<PageFilter> i = l.iterator(); final PageFilter f1 = i.next(); Assertions.assertTrue( f1 instanceof ProfanityFilter, "Not a Profanityfilter" ); final PageFilter f2 = i.next(); Assertions.assertTrue( f2 instanceof TestFilter, "Not a Testfilter" ); }
@Test public void testInitParams() throws Exception { final FilterManager m = new DefaultFilterManager( engine, props ); final List<PageFilter> l = m.getFilterList(); final Iterator<PageFilter> i = l.iterator(); i.next(); final TestFilter f2 = (TestFilter)i.next(); final Properties p = f2.m_properties; Assertions.assertEquals( "Zippadippadai", p.getProperty("foobar"), "no foobar" ); Assertions.assertEquals( "5", p.getProperty( "blatblaa" ), "no blatblaa" ); }