@Test
  public void testNumOfRunningFunctions() {
    initManagement(false);
    VM client = managedNodeList.get(2);
    client.invokeAsync(new SerializableRunnable() {
      @Override
      public void run() {
        Cache cache = getCache();
        SimpleWaitFunction<Boolean> simpleWaitFunction = new SimpleWaitFunction();
        SimpleWaitFunction.setLatch();
        Execution execution =
            FunctionService.onMember(cache.getDistributedSystem().getDistributedMember());
        execution.setArguments(Boolean.TRUE).execute(simpleWaitFunction);
      }
    });

    Integer numOfRunningFunctions =
        managingNode.invoke(TestFunctionsDUnitTest::getNumOfRunningFunction);

    assertTrue(numOfRunningFunctions > 0);

    client.invoke(new SerializableRunnable() {
      @Override
      public void run() {
        SimpleWaitFunction.clearLatch();
      }
    });
  }
This is for testing running functions
geode-core/src/distributedTest/java/org/apache/geode/management/internal/pulse/TestFunctionsDUnitTest.java