--- a/lucene/distribution.tests/src/test/org/apache/lucene/distribution/TestModularLayer.java
+++ /dev/null
@@ -1,420 +0,0 @@
-/*
- * 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.
- */
-package org.apache.lucene.distribution;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.lang.module.Configuration;
-import java.lang.module.ModuleDescriptor;
-import java.lang.module.ModuleFinder;
-import java.lang.module.ModuleReader;
-import java.lang.module.ModuleReference;
-import java.nio.charset.StandardCharsets;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.TreeMap;
-import java.util.TreeSet;
-import java.util.function.Predicate;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-import java.util.stream.Collectors;
-import java.util.stream.Stream;
-import org.assertj.core.api.Assertions;
-import org.assertj.core.api.Assumptions;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-/**
- * Sanity checks concerning the distribution's binary artifacts (modules).
- *
- * <p>We do <em>not</em> want this module to depend on any Lucene classes (including the test
- * framework) so that there is no risk of accidental classpath space pollution. This also means the
- * default {@code LuceneTestCase} configuration setup is not used (you have to annotate test for
- * JUnit, for example).
- */
-public class TestModularLayer extends AbstractLuceneDistributionTest {
-  /** All Lucene modules (including the test framework), no third party modules. */
-  private static Set<ModuleReference> allLuceneModules;
-
-  /** {@link ModuleFinder} resolving only the core Lucene modules. */
-  private static ModuleFinder allLuceneModulesFinder;
-
-  /** {@link ModuleFinder} resolving Lucene core and third party dependencies. */
-  private static ModuleFinder luceneCoreAndThirdPartyModulesFinder;
-
-  /**
-   * We accept external properties that point to the assembled set of distribution modules and to
-   * their expected version. These properties are collected and passed by gradle but can be provided
-   * manually (for IDE launches).
-   */
-  @BeforeClass
-  public static void checkModulePathProvided() {
-    String modulesPropertyValue = System.getProperty(DISTRIBUTION_PROPERTY);
-    if (modulesPropertyValue == null) {
-      throw new AssertionError(DISTRIBUTION_PROPERTY + " property is required for this test.");
-    }
-
-    Path modulesPath = getDistributionPath().resolve("modules");
-    if (!Files.isDirectory(modulesPath)) {
-      throw new AssertionError(
-          DISTRIBUTION_PROPERTY
-              + " property does not point to a directory where this path is present: "
-              + modulesPath.toAbsolutePath());
-    }
-
-    Path testModulesPath = Paths.get(modulesPropertyValue).resolve("modules-test-framework");
-    if (!Files.isDirectory(testModulesPath)) {
-      throw new AssertionError(
-          DISTRIBUTION_PROPERTY
-              + " property does not point to a directory where this path is present: "
-              + modulesPath.toAbsolutePath());
-    }
-
-    Path thirdPartyModulesPath = Paths.get(modulesPropertyValue).resolve("modules-thirdparty");
-    if (!Files.isDirectory(thirdPartyModulesPath)) {
-      throw new AssertionError(
-          DISTRIBUTION_PROPERTY
-              + " property does not point to a directory where this path is present: "
-              + thirdPartyModulesPath.toAbsolutePath());
-    }
-
-    allLuceneModulesFinder = ModuleFinder.of(modulesPath, testModulesPath);
-    allLuceneModules = allLuceneModulesFinder.findAll();
-
-    luceneCoreAndThirdPartyModulesFinder = ModuleFinder.of(modulesPath, thirdPartyModulesPath);
-  }
-
-  @AfterClass
-  public static void cleanup() {
-    allLuceneModules = null;
-    luceneCoreAndThirdPartyModulesFinder = null;
-    allLuceneModulesFinder = null;
-  }
-
-  /** Make sure all published module names remain constant, even if we reorganize the build. */
-  @Test
-  public void testExpectedDistributionModuleNames() {
-    Assertions.assertThat(
-            allLuceneModules.stream().map(module -> module.descriptor().name()).sorted())
-        .containsExactly(
-            "org.apache.lucene.analysis.common",
-            "org.apache.lucene.analysis.icu",
-            "org.apache.lucene.analysis.kuromoji",
-            "org.apache.lucene.analysis.morfologik",
-            "org.apache.lucene.analysis.nori",
-            "org.apache.lucene.analysis.opennlp",
-            "org.apache.lucene.analysis.phonetic",
-            "org.apache.lucene.analysis.smartcn",
-            "org.apache.lucene.analysis.stempel",
-            "org.apache.lucene.backward_codecs",
-            "org.apache.lucene.benchmark",
-            "org.apache.lucene.classification",
-            "org.apache.lucene.codecs",
-            "org.apache.lucene.core",
-            "org.apache.lucene.demo",
-            "org.apache.lucene.expressions",
-            "org.apache.lucene.facet",
-            "org.apache.lucene.grouping",
-            "org.apache.lucene.highlighter",
-            "org.apache.lucene.join",
-            "org.apache.lucene.luke",
-            "org.apache.lucene.memory",
-            "org.apache.lucene.misc",
-            "org.apache.lucene.monitor",
-            "org.apache.lucene.queries",
-            "org.apache.lucene.queryparser",
-            "org.apache.lucene.replicator",
-            "org.apache.lucene.sandbox",
-            "org.apache.lucene.spatial3d",
-            "org.apache.lucene.spatial_extras",
-            "org.apache.lucene.suggest",
-            "org.apache.lucene.test_framework");
-  }
-
-  /** Try to instantiate the demo classes so that we make sure their module layer is complete. */
-  @Test
-  public void testDemoClassesCanBeLoaded() {
-    ModuleLayer bootLayer = ModuleLayer.boot();
-    Assertions.assertThatNoException()
-        .isThrownBy(
-            () -> {
-              String demoModuleId = "org.apache.lucene.demo";
-
-              Configuration configuration =
-                  bootLayer
-                      .configuration()
-                      .resolve(
-                          luceneCoreAndThirdPartyModulesFinder,
-                          ModuleFinder.of(),
-                          List.of(demoModuleId));
-
-              ModuleLayer layer =
-                  bootLayer.defineModulesWithOneLoader(
-                      configuration, ClassLoader.getSystemClassLoader());
-
-              for (String className :
-                  List.of(
-                      "org.apache.lucene.demo.IndexFiles",
-                      "org.apache.lucene.demo.SearchFiles",
-                      "org.apache.lucene.index.CheckIndex")) {
-                Assertions.assertThat(layer.findLoader(demoModuleId).loadClass(className))
-                    .isNotNull();
-              }
-            });
-  }
-
-  /** Checks that Lucene Core is a MR-JAR and has Panama foreign classes */
-  @Test
-  public void testMultiReleaseJar() {
-    ModuleLayer bootLayer = ModuleLayer.boot();
-    Assertions.assertThatNoException()
-        .isThrownBy(
-            () -> {
-              String coreModuleId = "org.apache.lucene.core";
-
-              Configuration configuration =
-                  bootLayer
-                      .configuration()
-                      .resolve(
-                          luceneCoreAndThirdPartyModulesFinder,
-                          ModuleFinder.of(),
-                          List.of(coreModuleId));
-
-              ModuleLayer layer =
-                  bootLayer.defineModulesWithOneLoader(
-                      configuration, ClassLoader.getSystemClassLoader());
-
-              ClassLoader loader = layer.findLoader(coreModuleId);
-
-              final Set<Integer> jarVersions = Set.of(19, 20, 21);
-              for (var v : jarVersions) {
-                Assertions.assertThat(
-                        loader.getResource(
-                            "META-INF/versions/"
-                                + v
-                                + "/org/apache/lucene/store/MemorySegmentIndexInput.class"))
-                    .isNotNull();
-              }
-
-              final int runtimeVersion = Runtime.version().feature();
-              if (jarVersions.contains(Integer.valueOf(runtimeVersion))) {
-                Assertions.assertThat(
-                        loader.loadClass("org.apache.lucene.store.MemorySegmentIndexInput"))
-                    .isNotNull();
-              }
-            });
-  }
-
-  /** Make sure we don't publish automatic modules. */
-  @Test
-  public void testAllCoreModulesAreNamedModules() {
-    Assertions.assertThat(allLuceneModules)
-        .allSatisfy(
-            module -> {
-              Assertions.assertThat(module.descriptor().isAutomatic())
-                  .as(module.descriptor().name())
-                  .isFalse();
-            });
-  }
-
-  /** Ensure all modules have the same (expected) version. */
-  @Test
-  public void testAllModulesHaveExpectedVersion() {
-    String luceneBuildVersion = System.getProperty(VERSION_PROPERTY);
-    Assumptions.assumeThat(luceneBuildVersion).isNotNull();
-    for (var module : allLuceneModules) {
-      Assertions.assertThat(module.descriptor().rawVersion().orElse(null))
-          .as("Version of module: " + module.descriptor().name())
-          .isEqualTo(luceneBuildVersion);
-    }
-  }
-
-  /** Ensure SPIs are equal for the module and classpath layer. */
-  @Test
-  public void testModularAndClasspathProvidersAreConsistent() throws IOException {
-    for (var module : allLuceneModules) {
-      TreeMap<String, TreeSet<String>> modularProviders = getModularServiceProviders(module);
-      TreeMap<String, TreeSet<String>> classpathProviders = getClasspathServiceProviders(module);
-
-      // Compare services first so that the exception is shorter.
-      Assertions.assertThat(modularProviders.keySet())
-          .as("Modular services in module: " + module.descriptor().name())
-          .containsExactlyInAnyOrderElementsOf(classpathProviders.keySet());
-
-      // We're sure the services correspond to each other. Now, for each service, compare the
-      // providers.
-      for (var service : modularProviders.keySet()) {
-        Assertions.assertThat(modularProviders.get(service))
-            .as(
-                "Modular providers of service "
-                    + service
-                    + " in module: "
-                    + module.descriptor().name())
-            .containsExactlyInAnyOrderElementsOf(classpathProviders.get(service));
-      }
-    }
-  }
-
-  private TreeMap<String, TreeSet<String>> getClasspathServiceProviders(ModuleReference module)
-      throws IOException {
-    TreeMap<String, TreeSet<String>> services = new TreeMap<>();
-    Pattern serviceEntryPattern = Pattern.compile("META-INF/services/(?<serviceName>.+)");
-    try (ModuleReader reader = module.open();
-        Stream<String> entryStream = reader.list()) {
-      List<String> serviceProviderEntryList =
-          entryStream
-              .filter(entry -> serviceEntryPattern.matcher(entry).find())
-              .collect(Collectors.toList());
-
-      for (String entry : serviceProviderEntryList) {
-        List<String> implementations;
-        try (InputStream is = reader.open(entry).get()) {
-          implementations =
-              Arrays.stream(new String(is.readAllBytes(), StandardCharsets.UTF_8).split("\n"))
-                  .map(String::trim)
-                  .filter(line -> !line.isBlank() && !line.startsWith("#"))
-                  .collect(Collectors.toList());
-        }
-
-        Matcher matcher = serviceEntryPattern.matcher(entry);
-        if (!matcher.find()) {
-          throw new AssertionError("Impossible.");
-        }
-        String service = matcher.group("serviceName");
-        services.computeIfAbsent(service, k -> new TreeSet<>()).addAll(implementations);
-      }
-    }
-
-    return services;
-  }
-
-  private static TreeMap<String, TreeSet<String>> getModularServiceProviders(
-      ModuleReference module) {
-    return module.descriptor().provides().stream()
-        .collect(
-            Collectors.toMap(
-                ModuleDescriptor.Provides::service,
-                provides -> new TreeSet<>(provides.providers()),
-                (k, v) -> {
-                  throw new RuntimeException();
-                },
-                TreeMap::new));
-  }
-
-  /**
-   * Ensure all exported packages in the descriptor are in sync with the module's Java classes.
-   *
-   * <p>This test should be progressively tuned so that certain internal packages are hidden in the
-   * module layer.
-   */
-  @Test
-  public void testAllExportedPackagesInSync() throws IOException {
-    for (var module : allLuceneModules) {
-      Set<String> jarPackages = getJarPackages(module, entry -> true);
-      Set<ModuleDescriptor.Exports> moduleExports = new HashSet<>(module.descriptor().exports());
-
-      if (module.descriptor().name().equals("org.apache.lucene.luke")) {
-        jarPackages.removeIf(
-            entry -> {
-              // Luke's packages are not exported.
-              return entry.startsWith("org.apache.lucene.luke");
-            });
-      }
-
-      if (module.descriptor().name().equals("org.apache.lucene.core")) {
-        // Internal packages should not be exported to unqualified targets.
-        jarPackages.removeIf(
-            entry -> {
-              return entry.startsWith("org.apache.lucene.internal");
-            });
-
-        // Internal packages should use qualified exports.
-        moduleExports.removeIf(
-            export -> {
-              boolean isInternal = export.source().startsWith("org.apache.lucene.internal");
-              if (isInternal) {
-                Assertions.assertThat(export.targets())
-                    .containsExactlyInAnyOrder("org.apache.lucene.test_framework");
-              }
-              return isInternal;
-            });
-      }
-
-      Assertions.assertThat(moduleExports)
-          .as("Exported packages in module: " + module.descriptor().name())
-          .allSatisfy(
-              export -> {
-                Assertions.assertThat(export.targets())
-                    .as("We only support unqualified exports for now?")
-                    .isEmpty();
-              })
-          .map(ModuleDescriptor.Exports::source)
-          .containsExactlyInAnyOrderElementsOf(jarPackages);
-    }
-  }
-
-  /** This test ensures that all analysis modules open their resources files to core. */
-  @Test
-  public void testAllOpenAnalysisPackagesInSync() throws IOException {
-    for (var module : allLuceneModules) {
-      if (false == module.descriptor().name().startsWith("org.apache.lucene.analysis.")) {
-        continue; // at moment we only want to open resources inside analysis packages
-      }
-
-      // We only collect resources from the JAR file which are:
-      // - stopword files (*.txt)
-      // - ICU break iterator rules (*.brk)
-      var filter = Pattern.compile("/[^/]+\\.(txt|brk)$");
-      Set<String> jarPackages = getJarPackages(module, filter.asPredicate());
-      Set<ModuleDescriptor.Opens> moduleOpens = module.descriptor().opens();
-
-      Assertions.assertThat(moduleOpens)
-          .as("Open packages in module: " + module.descriptor().name())
-          .allSatisfy(
-              export -> {
-                Assertions.assertThat(export.targets())
-                    .as("Opens should only be targeted to Lucene Core.")
-                    .containsExactly("org.apache.lucene.core");
-              })
-          .map(ModuleDescriptor.Opens::source)
-          .containsExactlyInAnyOrderElementsOf(jarPackages);
-    }
-  }
-
-  private Set<String> getJarPackages(ModuleReference module, Predicate<String> entryFilter)
-      throws IOException {
-    try (ModuleReader reader = module.open()) {
-      return reader
-          .list()
-          .filter(
-              entry ->
-                  !entry.startsWith("META-INF/")
-                      && !entry.equals("module-info.class")
-                      && !entry.endsWith("/")
-                      && entryFilter.test(entry))
-          .map(entry -> entry.replaceAll("/[^/]+$", ""))
-          .map(entry -> entry.replace('/', '.'))
-          .collect(Collectors.toCollection(TreeSet::new));
-    }
-  }
-}
--- a/lucene/distribution.tests/src/test/org/apache/lucene/distribution/TestScripts.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * 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.
- */
-package org.apache.lucene.distribution;
-
-import com.carrotsearch.procfork.ForkedProcess;
-import com.carrotsearch.procfork.Launcher;
-import com.carrotsearch.procfork.ProcessBuilderLauncher;
-import com.carrotsearch.randomizedtesting.LifecycleScope;
-import com.carrotsearch.randomizedtesting.RandomizedTest;
-import java.nio.charset.Charset;
-import java.nio.charset.StandardCharsets;
-import java.nio.file.Files;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Locale;
-import java.util.concurrent.TimeUnit;
-import java.util.function.Supplier;
-import org.assertj.core.api.Assertions;
-import org.assertj.core.api.ThrowingConsumer;
-import org.junit.Test;
-
-/** Verify that scripts included in the distribution work. */
-public class TestScripts extends AbstractLuceneDistributionTest {
-  @Test
-  @RequiresGUI
-  public void testLukeCanBeLaunched() throws Exception {
-    Path distributionPath;
-    if (randomBoolean()) {
-      // Occasionally, be evil: put the distribution in a folder with a space inside. For Uwe.
-      distributionPath = RandomizedTest.newTempDir(LifecycleScope.TEST).resolve("uh oh");
-      Files.createDirectory(distributionPath);
-      new Sync().sync(getDistributionPath(), distributionPath);
-    } else {
-      distributionPath = getDistributionPath();
-    }
-
-    Path currentJava =
-        Paths.get(System.getProperty("java.home"), "bin", WINDOWS ? "java.exe" : "java");
-    Assertions.assertThat(currentJava).exists();
-
-    Path lukeScript = resolveScript(distributionPath.resolve("bin").resolve("luke"));
-
-    Launcher launcher =
-        new ProcessBuilderLauncher()
-            .executable(lukeScript)
-            // pass the same JVM which the tests are currently using; this also forces UTF-8 as
-            // console
-            // encoding so that we know we can safely read it.
-            .envvar("LAUNCH_CMD", currentJava.toAbsolutePath().toString())
-            .viaShellLauncher()
-            .cwd(distributionPath)
-            .args("--sanity-check");
-
-    execute(
-        launcher,
-        0,
-        120,
-        (outputBytes) -> {
-          // We know it's UTF-8 because we set file.encoding explicitly.
-          var output = Files.readString(outputBytes, StandardCharsets.UTF_8);
-          Assertions.assertThat(output).contains("[Vader] Hello, Luke.");
-        });
-  }
-
-  /** The value of <code>System.getProperty("os.name")</code>. * */
-  public static final String OS_NAME = System.getProperty("os.name");
-
-  /** True iff running on Windows. */
-  public static final boolean WINDOWS = OS_NAME.startsWith("Windows");
-
-  protected Path resolveScript(Path scriptPath) {
-    List<Path> candidates = new ArrayList<>();
-    candidates.add(scriptPath);
-
-    String fileName = scriptPath.getFileName().toString();
-    if (WINDOWS) {
-      candidates.add(scriptPath.resolveSibling(fileName + ".cmd"));
-      candidates.add(scriptPath.resolveSibling(fileName + ".bat"));
-    } else {
-      candidates.add(scriptPath.resolveSibling(fileName + ".sh"));
-    }
-
-    return candidates.stream()
-        .sequential()
-        .filter(Files::exists)
-        .findFirst()
-        .orElseThrow(() -> new AssertionError("No script found for the base path: " + scriptPath));
-  }
-
-  private static Supplier<Charset> forkedProcessCharset =
-      () -> {
-        // The default charset for a forked java process could be computed for the current
-        // platform but it adds more complexity. For now, assume it's just parseable ascii.
-        return StandardCharsets.ISO_8859_1;
-      };
-
-  protected void execute(
-      Launcher launcher,
-      int expectedExitCode,
-      long timeoutInSeconds,
-      ThrowingConsumer<Path> processOutputConsumer)
-      throws Exception {
-
-    try (ForkedProcess forkedProcess = launcher.execute()) {
-      String command = forkedProcess.getProcess().info().command().orElse("(unset command name)");
-
-      Charset charset = forkedProcessCharset.get();
-      try {
-        Process p = forkedProcess.getProcess();
-        if (!p.waitFor(timeoutInSeconds, TimeUnit.SECONDS)) {
-          throw new AssertionError("Forked process did not terminate in the expected time");
-        }
-
-        int exitStatus = p.exitValue();
-
-        Assertions.assertThat(exitStatus)
-            .as("forked process exit status")
-            .isEqualTo(expectedExitCode);
-
-        processOutputConsumer.accept(forkedProcess.getProcessOutputFile());
-      } catch (Throwable t) {
-        logSubprocessOutput(
-            command, Files.readString(forkedProcess.getProcessOutputFile(), charset));
-        throw t;
-      }
-    }
-  }
-
-  protected void logSubprocessOutput(String command, String output) {
-    System.out.printf(
-        Locale.ROOT,
-        "--- [forked subprocess output: %s] ---%n%s%n--- [end of subprocess output] ---%n",
-        command,
-        output);
-  }
-}
--- a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/spatial4j/ShapeRectRelationTestCase.java
+++ /dev/null
@@ -1,213 +0,0 @@
-/*
- * 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.
- */
-package org.apache.lucene.spatial.spatial4j;
-
-import static org.locationtech.spatial4j.distance.DistanceUtils.DEGREES_TO_RADIANS;
-
-import org.junit.Rule;
-import org.junit.Test;
-import org.locationtech.spatial4j.TestLog;
-import org.locationtech.spatial4j.context.SpatialContext;
-import org.locationtech.spatial4j.shape.Circle;
-import org.locationtech.spatial4j.shape.Point;
-import org.locationtech.spatial4j.shape.RectIntersectionTestHelper;
-import org.locationtech.spatial4j.shape.Shape;
-import org.locationtech.spatial4j.shape.ShapeFactory;
-
-public abstract class ShapeRectRelationTestCase extends RandomizedShapeTestCase {
-  protected static final double RADIANS_PER_DEGREE = Math.PI / 180.0;
-
-  @Rule public final TestLog testLog = TestLog.instance;
-
-  protected int maxRadius = 180;
-
-  public ShapeRectRelationTestCase() {
-    super(SpatialContext.GEO);
-  }
-
-  public abstract class AbstractRectIntersectionTestHelper
-      extends RectIntersectionTestHelper<Shape> {
-
-    public AbstractRectIntersectionTestHelper(SpatialContext ctx) {
-      super(ctx);
-    }
-
-    // 2 times each -- should be plenty
-
-    @Override
-    protected int getContainsMinimum(int laps) {
-      return 2;
-    }
-
-    @Override
-    protected int getIntersectsMinimum(int laps) {
-      return 2;
-    }
-
-    // producing "within" cases in Geo3D based on our random shapes doesn't happen often. It'd be
-    // nice to increase this.
-    @Override
-    protected int getWithinMinimum(int laps) {
-      return 2;
-    }
-
-    @Override
-    protected int getDisjointMinimum(int laps) {
-      return 2;
-    }
-
-    @Override
-    protected int getBoundingMinimum(int laps) {
-      return 2;
-    }
-  }
-
-  @Test
-  public void testGeoCircleRect() {
-    new AbstractRectIntersectionTestHelper(ctx) {
-
-      @Override
-      protected Shape generateRandomShape(Point nearP) {
-        final int circleRadius = maxRadius - random().nextInt(maxRadius); // no 0-radius
-        return ctx.getShapeFactory().circle(nearP, circleRadius);
-      }
-
-      @Override
-      protected Point randomPointInEmptyShape(Shape shape) {
-        return shape.getCenter();
-      }
-    }.testRelateWithRectangle();
-  }
-
-  @Test
-  public void testGeoBBoxRect() {
-    new AbstractRectIntersectionTestHelper(ctx) {
-
-      @Override
-      protected boolean isRandomShapeRectangular() {
-        return true;
-      }
-
-      @Override
-      protected Shape generateRandomShape(Point nearP) {
-        Point upperRight = randomPoint();
-        Point lowerLeft = randomPoint();
-        if (upperRight.getY() < lowerLeft.getY()) {
-          // swap
-          Point temp = upperRight;
-          upperRight = lowerLeft;
-          lowerLeft = temp;
-        }
-        return ctx.getShapeFactory().rect(lowerLeft, upperRight);
-      }
-
-      @Override
-      protected Point randomPointInEmptyShape(Shape shape) {
-        return shape.getCenter();
-      }
-    }.testRelateWithRectangle();
-  }
-
-  // very slow, and test sources are not here, so no clue how to fix
-  @Test
-  public void testGeoPolygonRect() {
-    new AbstractRectIntersectionTestHelper(ctx) {
-
-      @Override
-      protected Shape generateRandomShape(Point nearP) {
-        final Point centerPoint = randomPoint();
-        final int maxDistance = random().nextInt(maxRadius - 20) + 20;
-        final Circle pointZone = ctx.getShapeFactory().circle(centerPoint, maxDistance);
-        final int vertexCount = random().nextInt(3) + 3;
-        while (true) {
-          ShapeFactory.PolygonBuilder builder = ctx.getShapeFactory().polygon();
-          for (int i = 0; i < vertexCount; i++) {
-            final Point point = randomPointIn(pointZone);
-            builder.pointXY(point.getX(), point.getY());
-          }
-          try {
-            return builder.build();
-          } catch (
-              @SuppressWarnings("unused")
-              IllegalArgumentException e) {
-            // This is what happens when we create a shape that is invalid.  Although it is
-            // conceivable that there are cases where
-            // the exception is thrown incorrectly, we aren't going to be able to do that in this
-            // random test.
-            continue;
-          }
-        }
-      }
-
-      @Override
-      protected Point randomPointInEmptyShape(Shape shape) {
-        throw new IllegalStateException("unexpected; need to finish test code");
-      }
-
-      @Override
-      protected int getWithinMinimum(int laps) {
-        // Long/thin so lets just find 1.
-        return 1;
-      }
-    }.testRelateWithRectangle();
-  }
-
-  @Test
-  public void testGeoPathRect() {
-    new AbstractRectIntersectionTestHelper(ctx) {
-
-      @Override
-      protected Shape generateRandomShape(Point nearP) {
-        final Point centerPoint = randomPoint();
-        final int maxDistance = random().nextInt(maxRadius - 20) + 20;
-        final Circle pointZone = ctx.getShapeFactory().circle(centerPoint, maxDistance);
-        final int pointCount = random().nextInt(5) + 1;
-        final double width = (random().nextInt(89) + 1) * DEGREES_TO_RADIANS;
-        final ShapeFactory.LineStringBuilder builder = ctx.getShapeFactory().lineString();
-        while (true) {
-          for (int i = 0; i < pointCount; i++) {
-            final Point nextPoint = randomPointIn(pointZone);
-            builder.pointXY(nextPoint.getX(), nextPoint.getY());
-          }
-          builder.buffer(width);
-          try {
-            return builder.build();
-          } catch (
-              @SuppressWarnings("unused")
-              IllegalArgumentException e) {
-            // This is what happens when we create a shape that is invalid.  Although it is
-            // conceivable that there are cases where
-            // the exception is thrown incorrectly, we aren't going to be able to do that in this
-            // random test.
-            continue;
-          }
-        }
-      }
-
-      @Override
-      protected Point randomPointInEmptyShape(Shape shape) {
-        throw new IllegalStateException("unexpected; need to finish test code");
-      }
-
-      @Override
-      protected int getWithinMinimum(int laps) {
-        // Long/thin so lets just find 1.
-        return 1;
-      }
-    }.testRelateWithRectangle();
-  }
-}
--- a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/spatial4j/TestGeo3dShapeSphereModelRectRelation.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * 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.
- */
-package org.apache.lucene.spatial.spatial4j;
-
-import java.util.ArrayList;
-import java.util.List;
-import org.apache.lucene.spatial3d.geom.GeoArea;
-import org.apache.lucene.spatial3d.geom.GeoBBox;
-import org.apache.lucene.spatial3d.geom.GeoBBoxFactory;
-import org.apache.lucene.spatial3d.geom.GeoCircle;
-import org.apache.lucene.spatial3d.geom.GeoCircleFactory;
-import org.apache.lucene.spatial3d.geom.GeoPoint;
-import org.apache.lucene.spatial3d.geom.GeoPolygonFactory;
-import org.apache.lucene.spatial3d.geom.GeoShape;
-import org.apache.lucene.spatial3d.geom.PlanetModel;
-import org.junit.Test;
-import org.locationtech.spatial4j.shape.Circle;
-import org.locationtech.spatial4j.shape.Point;
-import org.locationtech.spatial4j.shape.Rectangle;
-import org.locationtech.spatial4j.shape.SpatialRelation;
-
-public class TestGeo3dShapeSphereModelRectRelation extends ShapeRectRelationTestCase {
-
-  PlanetModel planetModel = PlanetModel.SPHERE;
-
-  public TestGeo3dShapeSphereModelRectRelation() {
-    Geo3dSpatialContextFactory factory = new Geo3dSpatialContextFactory();
-    factory.planetModel = planetModel;
-    this.ctx = factory.newSpatialContext();
-  }
-
-  @Test
-  public void testFailure1() {
-    final GeoBBox rect =
-        GeoBBoxFactory.makeGeoBBox(
-            planetModel,
-            88 * RADIANS_PER_DEGREE,
-            30 * RADIANS_PER_DEGREE,
-            -30 * RADIANS_PER_DEGREE,
-            62 * RADIANS_PER_DEGREE);
-    final List<GeoPoint> points = new ArrayList<>();
-    points.add(
-        new GeoPoint(
-            planetModel, 30.4579218227 * RADIANS_PER_DEGREE, 14.5238410082 * RADIANS_PER_DEGREE));
-    points.add(
-        new GeoPoint(
-            planetModel, 43.684447915 * RADIANS_PER_DEGREE, 46.2210986329 * RADIANS_PER_DEGREE));
-    points.add(
-        new GeoPoint(
-            planetModel, 66.2465299717 * RADIANS_PER_DEGREE, -29.1786158537 * RADIANS_PER_DEGREE));
-    final GeoShape path = GeoPolygonFactory.makeGeoPolygon(planetModel, points);
-
-    final GeoPoint point =
-        new GeoPoint(
-            planetModel,
-            34.2730264413182 * RADIANS_PER_DEGREE,
-            82.75500168892472 * RADIANS_PER_DEGREE);
-
-    // Apparently the rectangle thinks the polygon is completely within it... "shape inside
-    // rectangle"
-    assertTrue(GeoArea.WITHIN == rect.getRelationship(path));
-
-    // Point is within path? Apparently not...
-    assertFalse(path.isWithin(point));
-
-    // If it is within the path, it must be within the rectangle, and similarly visa versa
-    assertFalse(rect.isWithin(point));
-  }
-
-  @Test
-  public void testFailure2_LUCENE6475() {
-    GeoCircle geo3dCircle =
-        GeoCircleFactory.makeGeoCircle(
-            planetModel,
-            1.6282053147165243E-4 * RADIANS_PER_DEGREE,
-            -70.1600629789353 * RADIANS_PER_DEGREE,
-            86 * RADIANS_PER_DEGREE);
-    Geo3dShape<GeoCircle> geo3dShape = new Geo3dShape<>(geo3dCircle, ctx);
-    Rectangle rect = ctx.getShapeFactory().rect(-118, -114, -2.0, 32.0);
-    assertTrue(geo3dShape.relate(rect).intersects());
-    // thus the bounding box must intersect too
-    assertTrue(geo3dShape.getBoundingBox().relate(rect).intersects());
-  }
-
-  @Test
-  public void pointBearingTest() {
-    double radius = 136;
-    double distance = 135.97;
-    double bearing = 188;
-    Point p = ctx.getShapeFactory().pointXY(35, 85);
-    Circle circle = ctx.getShapeFactory().circle(p, radius);
-    Point bPoint = ctx.getDistCalc().pointOnBearing(p, distance, bearing, ctx, (Point) null);
-
-    double d = ctx.getDistCalc().distance(p, bPoint);
-    assertEquals(d, distance, 10 - 8);
-
-    assertEquals(circle.relate(bPoint), SpatialRelation.CONTAINS);
-  }
-}
--- a/lucene/spatial-extras/src/test/org/apache/lucene/spatial/spatial4j/TestGeo3dShapeWGS84ModelRectRelation.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- * 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.
- */
-package org.apache.lucene.spatial.spatial4j;
-
-import com.carrotsearch.randomizedtesting.generators.RandomPicks;
-import org.apache.lucene.spatial3d.geom.GeoArea;
-import org.apache.lucene.spatial3d.geom.GeoBBox;
-import org.apache.lucene.spatial3d.geom.GeoBBoxFactory;
-import org.apache.lucene.spatial3d.geom.GeoCircle;
-import org.apache.lucene.spatial3d.geom.GeoCircleFactory;
-import org.apache.lucene.spatial3d.geom.GeoPath;
-import org.apache.lucene.spatial3d.geom.GeoPathFactory;
-import org.apache.lucene.spatial3d.geom.GeoPoint;
-import org.apache.lucene.spatial3d.geom.PlanetModel;
-import org.junit.Test;
-import org.locationtech.spatial4j.shape.Circle;
-import org.locationtech.spatial4j.shape.Point;
-import org.locationtech.spatial4j.shape.SpatialRelation;
-
-public class TestGeo3dShapeWGS84ModelRectRelation extends ShapeRectRelationTestCase {
-
-  PlanetModel planetModel =
-      RandomPicks.randomFrom(
-          random(), new PlanetModel[] {PlanetModel.WGS84, PlanetModel.CLARKE_1866});
-
-  public TestGeo3dShapeWGS84ModelRectRelation() {
-    Geo3dSpatialContextFactory factory = new Geo3dSpatialContextFactory();
-    factory.planetModel = planetModel;
-    this.ctx = factory.newSpatialContext();
-    this.maxRadius = 175;
-    ((Geo3dShapeFactory) ctx.getShapeFactory()).setCircleAccuracy(1e-12);
-  }
-
-  @Test
-  public void testFailure1() {
-    final GeoBBox rect =
-        GeoBBoxFactory.makeGeoBBox(
-            planetModel,
-            90 * RADIANS_PER_DEGREE,
-            74 * RADIANS_PER_DEGREE,
-            40 * RADIANS_PER_DEGREE,
-            60 * RADIANS_PER_DEGREE);
-    final GeoPoint[] pathPoints =
-        new GeoPoint[] {
-          new GeoPoint(
-              planetModel, 84.4987594274 * RADIANS_PER_DEGREE, -22.8345484402 * RADIANS_PER_DEGREE)
-        };
-    final GeoPath path =
-        GeoPathFactory.makeGeoPath(planetModel, 4 * RADIANS_PER_DEGREE, pathPoints);
-    assertTrue(GeoArea.DISJOINT == rect.getRelationship(path));
-    // This is what the test failure claimed...
-    // assertTrue(GeoArea.CONTAINS == rect.getRelationship(path));
-    // final GeoBBox bbox = getBoundingBox(path);
-    // assertFalse(GeoArea.DISJOINT == rect.getRelationship(bbox));
-  }
-
-  @Test
-  public void testFailure2() {
-    final GeoBBox rect =
-        GeoBBoxFactory.makeGeoBBox(
-            planetModel,
-            -74 * RADIANS_PER_DEGREE,
-            -90 * RADIANS_PER_DEGREE,
-            0 * RADIANS_PER_DEGREE,
-            26 * RADIANS_PER_DEGREE);
-    final GeoCircle circle =
-        GeoCircleFactory.makeGeoCircle(
-            planetModel,
-            -87.3647352103 * RADIANS_PER_DEGREE,
-            52.3769709972 * RADIANS_PER_DEGREE,
-            1 * RADIANS_PER_DEGREE);
-    assertTrue(GeoArea.DISJOINT == rect.getRelationship(circle));
-    // This is what the test failure claimed...
-    // assertTrue(GeoArea.CONTAINS == rect.getRelationship(circle));
-    // final GeoBBox bbox = getBoundingBox(circle);
-    // assertFalse(GeoArea.DISJOINT == rect.getRelationship(bbox));
-  }
-
-  @Test
-  public void testFailure3() {
-    /*
-     [junit4]   1> S-R Rel: {}, Shape {}, Rectangle {}    lap# {} [CONTAINS, Geo3dShape{planetmodel=PlanetModel: {xyScaling=1.0011188180710464, zScaling=0.9977622539852008}, shape=GeoPath: {planetmodel=PlanetModel: {xyScaling=1.0011188180710464, zScaling=0.9977622539852008}, width=1.53588974175501(87.99999999999999),
-      points={[[X=0.12097657665150223, Y=-0.6754177666095532, Z=0.7265376136709238], [X=-0.3837892785614207, Y=0.4258049113530899, Z=0.8180007850434892]]}}},
-      Rect(minX=4.0,maxX=36.0,minY=16.0,maxY=16.0), 6981](no slf4j subst; sorry)
-     [junit4] FAILURE 0.59s | Geo3dWGS84ShapeRectRelationTest.testGeoPathRect <<<
-     [junit4]    > Throwable #1: java.lang.AssertionError: Geo3dShape{planetmodel=PlanetModel: {xyScaling=1.0011188180710464, zScaling=0.9977622539852008}, shape=GeoPath: {planetmodel=PlanetModel: {xyScaling=1.0011188180710464, zScaling=0.9977622539852008}, width=1.53588974175501(87.99999999999999),
-      points={[[X=0.12097657665150223, Y=-0.6754177666095532, Z=0.7265376136709238], [X=-0.3837892785614207, Y=0.4258049113530899, Z=0.8180007850434892]]}}} intersect Pt(x=23.81626064835212,y=16.0)
-     [junit4]    >  at __randomizedtesting.SeedInfo.seed([2595268DA3F13FEA:6CC30D8C83453E5D]:0)
-     [junit4]    >  at org.apache.lucene.spatial.spatial4j.RandomizedShapeTestCase._assertIntersect(RandomizedShapeTestCase.java:168)
-     [junit4]    >  at org.apache.lucene.spatial.spatial4j.RandomizedShapeTestCase.assertRelation(RandomizedShapeTestCase.java:153)
-     [junit4]    >  at org.apache.lucene.spatial.spatial4j.RectIntersectionTestHelper.testRelateWithRectangle(RectIntersectionTestHelper.java:128)
-     [junit4]    >  at org.apache.lucene.spatial.spatial4j.Geo3dWGS84ShapeRectRelationTest.testGeoPathRect(Geo3dWGS84ShapeRectRelationTest.java:265)
-    */
-    final GeoBBox rect =
-        GeoBBoxFactory.makeGeoBBox(
-            planetModel,
-            16 * RADIANS_PER_DEGREE,
-            16 * RADIANS_PER_DEGREE,
-            4 * RADIANS_PER_DEGREE,
-            36 * RADIANS_PER_DEGREE);
-    final GeoPoint[] pathPoints =
-        new GeoPoint[] {
-          new GeoPoint(
-              planetModel, 46.6369060853 * RADIANS_PER_DEGREE, -79.8452213228 * RADIANS_PER_DEGREE),
-          new GeoPoint(
-              planetModel, 54.9779334519 * RADIANS_PER_DEGREE, 132.029177424 * RADIANS_PER_DEGREE)
-        };
-    final GeoPath path =
-        GeoPathFactory.makeGeoPath(planetModel, 88 * RADIANS_PER_DEGREE, pathPoints);
-    System.out.println("rect=" + rect);
-    // Rectangle is within path (this is wrong; it's on the other side.  Should be OVERLAPS)
-    assertTrue(GeoArea.OVERLAPS == rect.getRelationship(path));
-    // Rectangle contains point
-    // assertTrue(rect.isWithin(pt));
-    // Path contains point (THIS FAILS)
-    // assertTrue(path.isWithin(pt));
-    // What happens: (1) The center point of the horizontal line is within the path, in fact within
-    // a radius of one of the endpoints.
-    // (2) The point mentioned is NOT inside either SegmentEndpoint.
-    // (3) The point mentioned is NOT inside the path segment, either.  (I think it should be...)
-  }
-
-  @Test
-  public void pointBearingTest() {
-    double radius = 136;
-    double distance = 135.97;
-    double bearing = 188;
-    Point p = ctx.getShapeFactory().pointXY(35, 85);
-    Circle circle = ctx.getShapeFactory().circle(p, radius);
-    Point bPoint = ctx.getDistCalc().pointOnBearing(p, distance, bearing, ctx, (Point) null);
-
-    double d = ctx.getDistCalc().distance(p, bPoint);
-    assertEquals(d, distance, 10 - 8);
-
-    assertEquals(circle.relate(bPoint), SpatialRelation.CONTAINS);
-  }
-
-  // very slow, test sources are not all here, no clue how to fix it
-  @Nightly
-  @Override
-  public void testGeoCircleRect() {
-    super.testGeoCircleRect();
-  }
-
-  // very slow, test sources are not all here, no clue how to fix it
-  @Nightly
-  @Override
-  public void testGeoPolygonRect() {
-    super.testGeoPolygonRect();
-  }
-
-  // very slow, test sources are not all here, no clue how to fix it
-  @Nightly
-  @Override
-  public void testGeoPathRect() {
-    super.testGeoPathRect();
-  }
-}
