@Test
  public void testRollingUpgradeWithDeployment() {
    final int locatorPort = portSupplier.getAvailablePort();
    final int locatorJmxPort = portSupplier.getAvailablePort();
    final int locator2Port = portSupplier.getAvailablePort();
    final int locator2JmxPort = portSupplier.getAvailablePort();
    final int server1Port = portSupplier.getAvailablePort();
    final int server2Port = portSupplier.getAvailablePort();

    final GfshExecution startupExecution =
        GfshScript.of(
            startLocatorCommandWithConfig("locator1", locatorPort, locatorJmxPort, -1))
            .and(startLocatorCommandWithConfig("locator2", locator2Port, locator2JmxPort,
                locatorPort))
            .and(startServerCommandWithConfig("server1", server1Port, locatorPort))
            .and(startServerCommandWithConfig("server2", server2Port, locatorPort))
            .execute(oldGfsh, tempFolder);

    initializeRegion(locatorPort);
    causeP2PTraffic(locatorPort);

    // doing rolling upgrades
    upgradeLocator("locator1", locatorPort, locatorJmxPort, locator2Port, startupExecution);
    verifyListMembers(locatorPort);
    causeP2PTraffic(locatorPort);

    upgradeLocator("locator2", locator2Port, locator2JmxPort, locatorPort, startupExecution);
    verifyListMembers(locatorPort);
    causeP2PTraffic(locatorPort);

    // make sure servers can do rolling upgrade too
    upgradeServer("server1", server1Port, locatorPort, startupExecution);
    causeP2PTraffic(locatorPort);

    upgradeServer("server2", server2Port, locatorPort, startupExecution);
    causeP2PTraffic(locatorPort);
  }
This test iterates through the versions of Geode and executes client compatibility with
the current version of Geode.
geode-assembly/src/upgradeTest/java/org/apache/geode/management/RollingUpgradeWithSslDUnitTest.java