private static Integer getNumOfRunningFunction() {

    await().until(() -> {
      final ManagementService service = getManagementService();
      final DistributedSystemMXBean bean = service.getDistributedSystemMXBean();
      if (bean != null) {
        return bean.getNumRunningFunctions() > 0;
      }
      return false;
    });

    final DistributedSystemMXBean bean = getManagementService().getDistributedSystemMXBean();
    assertNotNull(bean);

    return bean.getNumRunningFunctions();
  }
This is for testing running functions
geode-core/src/distributedTest/java/org/apache/geode/management/internal/pulse/TestFunctionsDUnitTest.java