public static void printIfErrorEnabled(Logger logger, String s, Object... args) {
        if (logger.isErrorEnabled()) {
            logger.error(s, args);
        }
    }
@Test
    void testPrintIfErrorEnabled() {
        Logger logger = Mockito.mock(Logger.class);
        Mockito.when(logger.isErrorEnabled()).thenReturn(true);
        LoggerUtils.printIfErrorEnabled(logger, "test", "arg1", "arg2", "arg3");
        Mockito.verify(logger, Mockito.times(1)).error("test", "arg1", "arg2", "arg3");
    }