title: MockAnalyzer in Lucene: attach stemmer or any custom filter?
body: <p>The code for unit-testing is briefly this:</p>
  
  <pre><code>Analyzer analyzer = new MockAnalyzer(random, MockTokenizer.SIMPLE, true);
  rd = newDirectory();
  IndexWriter w = new IndexWriter(rd, newIndexWriterConfig(TEST_VERSION_CURRENT, analyzer));
  </code></pre>
  
  <p>I would like to be able to configure my own custom filters and add PorterStemmer filter to this configuration. Is it possible to do it with the MockAnalyzer class or should some other class be used for the purpose? </p>