### Question:
MavenLoggerFactory extends SimpleLoggerFactory implements MavenSlf4jWrapperFactory { @Override public Logger getLogger( String name ) { Logger simpleLogger = loggerMap.get( name ); if ( simpleLogger != null ) { return simpleLogger; } else { Logger newInstance = getNewLoggingInstance( name ); Logger oldInstance = loggerMap.putIfAbsent( name, newInstance ); return oldInstance == null ? newInstance : oldInstance; } }  @Override void setLogLevelRecorder( LogLevelRecorder logLevelRecorder ); @Override Optional<LogLevelRecorder> getLogLevelRecorder(); @Override Logger getLogger( String name );  }### Answer:
@Test public void createsSimpleLogger() { MavenLoggerFactory mavenLoggerFactory = new MavenLoggerFactory(); Logger logger = mavenLoggerFactory.getLogger( "Test" ); assertThat( logger, instanceOf( MavenSimpleLogger.class ) ); }
@Test public void loggerCachingWorks() { MavenLoggerFactory mavenLoggerFactory = new MavenLoggerFactory(); Logger logger = mavenLoggerFactory.getLogger( "Test" ); Logger logger2 = mavenLoggerFactory.getLogger( "Test" ); Logger differentLogger = mavenLoggerFactory.getLogger( "TestWithDifferentName" ); assertNotNull( logger ); assertNotNull( differentLogger ); assertSame( logger, logger2 ); assertNotSame( logger, differentLogger ); }