AbstractLoggerFactory implements LoggerFactory { @Override public Logger create(Class<?> binding) { requireNonNull(binding); return acquireLogger(makeNameFrom(binding)); } AbstractLoggerFactory(); @Override Logger create(Class<?> binding); @Override Logger create(String binding); @Override synchronized void setFormatter(LoggerFormatter formatter); @Override synchronized LoggerFormatter getFormatter(); abstract Logger make(String binding, LoggerFormatter formatter); @Override void addListener(LoggerEventListener listener); @Override void removeListener(LoggerEventListener listener); @Override Stream<LoggerEventListener> listeners(); @Override Stream<Entry<String, Logger>> loggers(); @Override void setLevel(String path, Level level); @Override void setLevel(Class<?> binding, Level level);  }
@Test void create() { final Logger logger = instance.create(AbstractLoggerFactoryTest.class); assertEquals(MyLogger.class, logger.getClass()); logger.fatal("Foo"); assertTrue(output.contains(AbstractLoggerFactoryTest.class.getSimpleName())); }
@Test void testCreate() { final String text = "SomeText"; final Logger logger = instance.create("SomeBinding"); assertEquals(MyLogger.class, logger.getClass()); logger.fatal(text); assertTrue(output.contains(text)); }