private void stopLocator(final VM vm) {
    vm.invoke("Stop Locator In VM", () -> {
      assertThat(InternalLocator.hasLocator()).isTrue();

      InternalLocator.getLocator().stop();
    });
  }
Starts a locator with given configuration. If DS is already started it will use the same DS
geode-core/src/distributedTest/java/org/apache/geode/management/LocatorManagementDUnitTest.java