### Question:
StopwordFilterFactory implements TokenFilterFactory { public void preloadResources(Properties properties) throws IOException { String filePath = properties.getProperty(FILE_PATH_PARAMETER); String[] stopwords = getStopwords(filePath ); } StopwordFilterFactory(PlainFileReaderFactory plainFileReaderFactory); TokenFilter createTokenFilter(TokenStream tokenStream,
			Properties properties); void preloadResources(Properties properties); static final String FILE_PATH_PARAMETER; static final String IGRNORE_CASE_PARAMETER; }### Answer:
@Test public void testPreloadResources() throws Exception{ Properties properties = new Properties(); properties.setProperty(ReplaceFilterFactory.FILE_PATH_PARAMETER, TEST_FILE_1); expect(plainFileReaderFactory.createPlainFileReader(TEST_FILE_1)).andReturn(plainFileReader); expect(plainFileReader.readLines()).andReturn(lines); replay(plainFileReaderFactory); replay(plainFileReader); stopwordFilterFactory.preloadResources(properties); verify(plainFileReaderFactory); verify(plainFileReader); reset(plainFileReaderFactory); reset(plainFileReader); replay(plainFileReaderFactory); replay(plainFileReader); stopwordFilterFactory.preloadResources(properties); verify(plainFileReaderFactory); verify(plainFileReader); }