@Before
  public void setup() throws Exception {
    currentGfsh = gfshRule.executor().build();
    oldGfsh = gfshRule.executor().withVmConfiguration(sourceVmConfiguration).build();

    String version = sourceVmConfiguration.geodeVersion().toString();
    Path installLocation;
    if (version == null || VersionManager.isCurrentVersion(version)) {
      installLocation = new RequiresGeodeHome().getGeodeHome().toPath();
    } else {
      installLocation = Paths.get(VersionManager.getInstance().getInstall(version));
    }

    File oldBuild = installLocation.toFile();
    File oldModules = installLocation.resolve("tools").resolve("Modules").toFile();

    Path tempFolder = folderRule.getFolder().toPath();

    tomcat8AndOldModules =
        new TomcatInstall(tempFolder, "Tomcat8AndOldModules", TomcatInstall.TomcatVersion.TOMCAT8,
            ContainerInstall.ConnectionType.CLIENT_SERVER,
            oldModules.getAbsolutePath(),
            oldBuild.getAbsolutePath() + "/lib",
            portSupplier::getAvailablePort, TomcatInstall.CommitValve.DEFAULT);

    tomcat8AndCurrentModules =
        new TomcatInstall(tempFolder, "Tomcat8AndCurrentModules",
            TomcatInstall.TomcatVersion.TOMCAT8,
            ContainerInstall.ConnectionType.CLIENT_SERVER,
            portSupplier::getAvailablePort, TomcatInstall.CommitValve.DEFAULT);

    classPathTomcat8AndOldModules = getClassPathTomcat8AndOldModules();

    classPathTomcat8AndCurrentModules = getClassPathTomcat8AndCurrentModules();

    // Get available port for the locator
    locatorPort = portSupplier.getAvailablePort();
    locatorJmxPort = portSupplier.getAvailablePort();

    tomcat8AndOldModules.setDefaultLocatorPort(locatorPort);
    tomcat8AndCurrentModules.setDefaultLocatorPort(locatorPort);

    client = new Client();
    manager = new ContainerManager();
    // Due to parameterization of the test name, the URI would be malformed. Instead, it strips off
    // the [] symbols
    manager.setTestName(testName.getMethodName().replaceAll("[\\[\\] ,]+", ""));

    locatorDir = tempFolder.resolve("loc");
    server1Dir = tempFolder.resolve("server1");
    server2Dir = tempFolder.resolve("server2");
  }
This test iterates through the versions of Geode and executes session client compatibility with
the current version of Geode.
geode-assembly/src/upgradeTest/java/org/apache/geode/session/tests/Tomcat8ClientServerRollingUpgradeTest.java