private void startLocator(String name) throws IOException {
    Path dir = createDirectories(rootFolder.resolve(name));

    int[] availablePorts = getRandomAvailableTCPPorts(3);
    locatorPort = availablePorts[0];
    locatorHttpPort = availablePorts[1];
    int locatorJmxPort = availablePorts[2];

    String startLocatorCommand = String.join(" ",
        "start locator",
        "--connect=false",
        "--name=" + name,
        "--dir=" + dir,
        "--bind-address=127.0.0.1",
        "--port=" + locatorPort,
        "--http-service-port=" + locatorHttpPort,
        "--J=-Dgemfire.jmx-manager-port=" + locatorJmxPort,
        "--security-properties-file=" + clusterSecurityProperties);

    gfshRule.execute(startLocatorCommand);
  }
This test verifies that rotating to an untrusted certificate causes an exception when the
client tries to form a new secure connection. This is a sanity check that certificates are
being dynamically updated.
geode-assembly/src/acceptanceTest/java/org/apache/geode/ssl/CertificateRotationTest.java