package org.apache.lucene.index;

/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

import org.apache.lucene.codecs.Codec;

/**
 * Tests with the default randomized codec. Not really redundant with
 * other specific instantiations since we want to test some test-only impls
 * like Asserting, as well as make it easy to write a codec and pass -Dtests.codec
 */
public class TestStoredFieldsFormat extends BaseStoredFieldsFormatTestCase {

  @Override
  protected Codec getCodec() {
    return Codec.getDefault();
  }
}

@@ -830,16 +830,45 @@
 e.%0A */%0A%0A
+import java.io.IOException;%0A%0A
 import o
@@ -897,16 +897,62 @@
 s.Codec;
+%0Aimport org.apache.lucene.util.LuceneTestCase;
 %0A%0A/**%0A *
@@ -1303,16 +1303,16 @@
 dec() %7B%0A
-
     retu
@@ -1338,10 +1338,415 @@
 ();%0A  %7D%0A
+  %0A  @Override%0A  public void testWriteReadMerge() throws IOException %7B%0A    assumeFalse(%22impersonation isnt good enough%22, LuceneTestCase.PREFLEX_IMPERSONATION_IS_ACTIVE);%0A    // this test tries to switch up between the codec and another codec.%0A    // for 3.x: we currently cannot take an index with existing 4.x segments%0A    // and merge into newly formed 3.x segments.%0A    super.testWriteReadMerge();%0A  %7D%0A
 %7D%0A

fix test bug: we cant merge 4.x segments into a 3.x index