public class TestCachingSpanFilter extends LuceneTestCase {
public void testEnforceDeletions() throws Exception {
Directory dir = newDirectory();
RandomIndexWriter writer = new RandomIndexWriter(random, dir,
newIndexWriterConfig(random, TEST_VERSION_CURRENT, new WhitespaceAnalyzer(TEST_VERSION_CURRENT)).setMergeScheduler(new SerialMergeScheduler()));
// asserts below requires no unexpected merges:
((LogMergePolicy) writer.w.getMergePolicy()).setMergeFactor(10);
// NOTE: cannot use writer.getReader because RIW (on
// flipping a coin) may give us a newly opened reader,