private void validateLocatorMXBean(final VM locatorVM, final int port) {
    locatorVM.invoke("validateLocatorMXBean", () -> {
      LocatorMXBean locatorMXBean = awaitLocalLocatorMXBean();

      assertThat(locatorMXBean.getPort()).isEqualTo(port);
    });
  }
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