@Test
  public void rebalanceCommandShouldNotLaunchNonDaemonThreads() {
    gfsh.executeAndAssertThat("rebalance").statusIsSuccess();
    locator.invoke(() -> {
      assertThat(Thread.getAllStackTraces().keySet().stream()
          .anyMatch(thread -> !thread.isDaemon()
              && thread.getName().contains(RebalanceCommand.THREAD_NAME)))
                  .as("Rebalance Command should not launch non daemon threads")
                  .isFalse();
    });
  }
See GEODE-8071.
The test simply asserts that the re-balance command doesn't launch a non daemon thread
during its execution.
geode-assembly/src/acceptanceTest/java/org/apache/geode/management/internal/cli/commands/RebalanceCommandAcceptanceTest.java