LogManager { public static Logger exists(final String name) { synchronized (mutex) { return loggers.get(name); } } LogManager(); static Logger getRootLogger(); static Logger getLogger(final String name); static Logger getLogger(final String name, final LoggerFactory factory); @SuppressWarnings("rawtypes") static Logger getLogger(final Class clazz); static Logger exists(final String name); @SuppressWarnings("rawtypes") static Enumeration getCurrentLoggers(); static void shutdown(); static void resetConfiguration();  }
@Test public void exists() { Logger logger = LogManager.exists("test.example.NewClass"); assertThat(logger).isNull(); LogManager.getLogger("test.example.NewClass"); logger = LogManager.exists("test.example.NewClass"); assertThat(logger).isNotNull(); }