LogbackUtil { public static Level convertLevel(ch.qos.logback.classic.Level level) { if (ch.qos.logback.classic.Level.DEBUG_INT == level.toInt()) { return Level.FINE; } else if (ch.qos.logback.classic.Level.TRACE_INT == level.toInt()) { return Level.FINEST; } else if (ch.qos.logback.classic.Level.INFO_INT == level.toInt()) { return Level.INFO; } else if (ch.qos.logback.classic.Level.WARN_INT == level.toInt()) { return Level.WARNING; } else if (ch.qos.logback.classic.Level.ERROR_INT == level.toInt()) { return Level.SEVERE; } return Level.INFO; }  static LogDataBuilder translate(ILoggingEvent ev); static void addCallerData(ILoggingEvent ev, LogDataBuilder builder); static void addException(IThrowableProxy throwableProxy, String message, LogDataBuilder builder); static void addMarker(Marker marker, Map<String, String> mdcMap, LogDataBuilder builder); static Level convertLevel(ch.qos.logback.classic.Level level);  }
@Test(dataProvider = "levels") public void testConvertLevel(ch.qos.logback.classic.Level logback, Level level) throws Exception { assertEquals(LogbackUtil.convertLevel(logback), level, "Level " + logback + " should be translated to " + level); }