public static void debug(Logger logger, String msg) {
        if (logger == null) {
            return;
        }

        if (logger.isDebugEnabled()) {
            logger.debug(msg);
        }
    }
@Test
    void testDebug() {
        Logger logger = Mockito.mock(Logger.class);
        when(logger.isDebugEnabled()).thenReturn(true);
        LogHelper.debug(logger, "debug");
        verify(logger).debug("debug");
        Throwable t = new RuntimeException();
        LogHelper.debug(logger, t);
        verify(logger).debug(t);
        LogHelper.debug(logger, "debug", t);
        verify(logger).debug("debug", t);
    }