@Test
  public void startsLocatorWithJmxManager() {
    startLocator(newBuilder()
        .setDeletePidFileOnStop(true)
        .setMemberName(getUniqueName())
        .setPort(defaultLocatorPort)
        .setRedirectOutput(false)
        .setWorkingDirectory(getWorkingDirectoryPath())
        .set(ENABLE_CLUSTER_CONFIGURATION, "false")
        .set(JMX_MANAGER, "true")
        .set(JMX_MANAGER_START, "true")
        .set(JMX_MANAGER_PORT, String.valueOf(jmxManagerPort))
        .set(LOG_LEVEL, "config"));

    stopLocator();

    assertDeletionOf(getPidFile());
    assertThatThreadsStopped();
  }
Using Awaitility will increase total thread count by 1: ConditionAwaiter$ConditionPoller.
geode-core/src/integrationTest/java/org/apache/geode/distributed/LocatorLauncherJmxManagerLocalRegressionTest.java