@Deprecated
  public static void logThreadInfo(org.apache.commons.logging.Log log,
      String title,
      long minInterval) {
    boolean dumpStack = false;
    if (log.isInfoEnabled()) {
      synchronized (ReflectionUtils.class) {
        long now = Time.monotonicNow();
        if (now - previousLogTime >= minInterval * 1000) {
          previousLogTime = now;
          dumpStack = true;
        }
      }
      if (dumpStack) {
        try {
          ByteArrayOutputStream buffer = new ByteArrayOutputStream();
          printThreadInfo(new PrintStream(buffer, false, "UTF-8"), title);
          log.info(buffer.toString(StandardCharsets.UTF_8.name()));
        } catch (UnsupportedEncodingException ignored) {
        }
      }
    }
  }
@Test
  public void testLogThreadInfo() throws Exception {
    Logger logger = LoggerFactory.getLogger(TestReflectionUtils.class);
    LogCapturer logCapturer = LogCapturer.captureLogs(logger);

    final String title = "title";
    ReflectionUtils.logThreadInfo(logger, title, 0L);

    Assertions.assertThat(logCapturer.getOutput())
        .contains("Process Thread Dump: " + title);
  }