@Test
  public void testConnectToOwnLocator() throws Exception {
    String locators = hostName + "[" + port1 + "]";

    Properties props = getBasicProperties(locators);
    props.setProperty(ENABLE_CLUSTER_CONFIGURATION, "false");

    Locator locator = Locator.startLocatorAndDS(port1, null, props);
    system = (InternalDistributedSystem) locator.getDistributedSystem();
    system.disconnect();
    locator.stop();
  }
Tests that a VM can connect to a locator that is hosted in its own VM.
geode-core/src/distributedTest/java/org/apache/geode/distributed/LocatorDUnitTest.java