protected void startServer(String name, String classPath, int locatorPort) throws IOException {
    File serverFile = new File("server_dir_" + this.getClass().getSimpleName() + "_"
        + testName.getMethodName().replace("[", "").replace("]", ""));
    boolean success = serverFile.mkdir();
    if (!success) {
      throw new IOException("Cannot mkdir for file " + serverFile);
    }
    serverDir = serverFile.getAbsolutePath();
    CommandStringBuilder command = new CommandStringBuilder(CliStrings.START_SERVER);
    command.addOption(CliStrings.START_SERVER__NAME, name);
    command.addOption(CliStrings.START_SERVER__SERVER_PORT, "0");
    command.addOption(CliStrings.START_SERVER__CLASSPATH, classPath);
    command.addOption(CliStrings.START_SERVER__LOCATORS, "localhost[" + locatorPort + "]");
    command.addOption(CliStrings.START_SERVER__DIR, serverDir);
    gfsh.executeAndAssertThat(command.toString()).statusIsSuccess();
  }
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/TomcatSessionBackwardsCompatibilityTestBase.java