public static String dumpThreads() {
    ThreadMXBean threadMXBean = ManagementFactory.getThreadMXBean();
    long[] allThreadIds = threadMXBean.getAllThreadIds();
    ThreadInfo[] threadInfos = threadMXBean.getThreadInfo(allThreadIds, true, true);

    StringBuilder dumpWriter = new StringBuilder();
    Arrays.stream(threadInfos)
        .filter(Objects::nonNull)
        .forEach(dumpWriter::append);
    return dumpWriter.toString();
  }
Deregisters a {@link VMEventListener}.

@param listener the {@link VMEventListener} to deregister
geode-dunit/src/main/java/org/apache/geode/test/dunit/VM.java