protected int startLocator(final String hostName, final String otherLocators) throws Exception {
    disconnectFromDS();
    int[] ports = getRandomAvailableTCPPorts(2);
    int httpPort = ports[0];
    int jmxManagerPort = ports[1];
    Properties props = new Properties();
    props.put(MCAST_PORT, String.valueOf(0));
    props.put(LOCATORS, otherLocators);
    props.put(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
    props.put(ENABLE_CLUSTER_CONFIGURATION, "false");
    props.put(HTTP_SERVICE_PORT, String.valueOf(httpPort));
    props.put(JMX_MANAGER_PORT, String.valueOf(jmxManagerPort));
    File logFile = new File("");
    InetAddress bindAddr = null;
    try {
      bindAddr = InetAddress.getByName(hostName);
    } catch (UnknownHostException uhe) {
      Assert.fail("While resolving bind address ", uhe);
    }
    Locator locator = Locator.startLocatorAndDS(0, logFile, bindAddr, props);
    remoteObjects.put(LOCATOR_KEY, locator);
    return locator.getPort();
  }
A map for storing temporary objects in a remote VM so that they can be used between calls.
Cleared after each test.
geode-dunit/src/main/java/org/apache/geode/cache/client/internal/LocatorTestBase.java