private String startAServer(int serverNumber) {
    // List of all the jars for tomcat to put on the server classpath
    Path libDir = install.getHome().resolve("lib");
    Path binDir = install.getHome().resolve("bin");

    // Set server name based on the test about to be run
    String serverName =
        getClass().getSimpleName() + "_" + testName.getMethodName() + "_" + serverNumber;

    // Create command string for starting server
    CommandStringBuilder command = new CommandStringBuilder(CliStrings.START_SERVER);
    command.addOption(CliStrings.START_SERVER__NAME, serverName);
    int locatorPortSuggestion = AvailablePortHelper.getRandomAvailableTCPPort();
    command.addOption(CliStrings.START_SERVER__SERVER_PORT, String.valueOf(locatorPortSuggestion));
    // Add Tomcat jars to server classpath
    command.addOption(CliStrings.START_SERVER__CLASSPATH,
        binDir + "/*" + File.pathSeparator + libDir + "/*");
    command.addOption(CliStrings.START_SERVER__LOCATORS,
        locatorVM.invoke(() -> ClusterStartupRule.getLocator().asString()));
    command.addOption(CliStrings.START_SERVER__J, "-Dgemfire.member-timeout=60000");

    // Start server
    gfsh.executeAndAssertThat(command.toString()).statusIsSuccess();

    return serverName;
  }
Starts a server for the client Tomcat container to connect to using the GFSH command line
before each test
geode-assembly/src/distributedTest/java/org/apache/geode/session/tests/TomcatClientServerTest.java