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

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