LoggerFactory { public static Logger getLogger(Class<?> key) { return LOGGERS.computeIfAbsent(key.getName(), name -> new FailsafeLogger(LOGGER_ADAPTER.getLogger(name))); } private  LoggerFactory(); static void setLoggerAdapter(String loggerAdapter); static void setLoggerAdapter(LoggerAdapter loggerAdapter); static Logger getLogger(Class<?> key); static Logger getLogger(String key); static Level getLevel(); static void setLevel(Level level); static File getFile();  }
@Test public void testGetLogger() { Logger logger1 = LoggerFactory.getLogger(this.getClass()); Logger logger2 = LoggerFactory.getLogger(this.getClass()); assertThat(logger1, is(logger2)); }
@Test public void shouldReturnSameLogger() { Logger logger1 = LoggerFactory.getLogger(this.getClass().getName()); Logger logger2 = LoggerFactory.getLogger(this.getClass().getName()); assertThat(logger1, is(logger2)); }