JavaLoggingUtilLogger implements LoggerImplementation { @Override public void log(String logger, LoggingLevel level, String message, Throwable cause, InvocationDetails details) { java.util.logging.Logger lgr = Logger.getLogger(logger); lgr.log( levelMapping.getOrDefault(level, Level.ALL), message, cause ); }  @Override void log(String logger,
                    LoggingLevel level,
                    String message,
                    Throwable cause,
                    InvocationDetails details); @Override boolean isLevelEnabled(LoggingLevel level);  }
@Test public void levelMappingTest() throws Exception { JavaLoggingUtilLogger logger = new JavaLoggingUtilLogger(); logger.log(TEST_LOGGER, LoggingLevel.TRACE, "trace message", null, null); Thread.sleep(100); assertThat(log.getLastLog(), is(equalTo(new Log(TEST_LOGGER, "trace message", Level.FINER, null)))); logger.log(TEST_LOGGER, LoggingLevel.DEBUG, "debug message", null, null); assertThat(log.getLastLog(), is(equalTo(new Log(TEST_LOGGER, "debug message", Level.FINE, null)))); logger.log(TEST_LOGGER, LoggingLevel.INFO, "info message", null, null); assertThat(log.getLastLog(), is(equalTo(new Log(TEST_LOGGER, "info message", Level.INFO, null)))); logger.log(TEST_LOGGER, LoggingLevel.WARN, "warn message", null, null); assertThat(log.getLastLog(), is(equalTo(new Log(TEST_LOGGER, "warn message", Level.WARNING, null)))); logger.log(TEST_LOGGER, LoggingLevel.ERROR, "error message", null, null); assertThat(log.getLastLog(), is(equalTo(new Log(TEST_LOGGER, "error message", Level.SEVERE, null)))); }