### Question:
MavenLoggerFactory extends SimpleLoggerFactory implements MavenSlf4jWrapperFactory { @Override public void setLogLevelRecorder( LogLevelRecorder logLevelRecorder ) { if ( this.logLevelRecorder != null ) { throw new IllegalStateException( "LogLevelRecorder has already been set." ); } this.logLevelRecorder = logLevelRecorder; }  @Override void setLogLevelRecorder( LogLevelRecorder logLevelRecorder ); @Override Optional<LogLevelRecorder> getLogLevelRecorder(); @Override Logger getLogger( String name );  }### Answer:
@Test( expected = IllegalStateException.class ) public void failOnSeverityThresholdCanOnlyBeSetOnce() { MavenLoggerFactory mavenLoggerFactory = new MavenLoggerFactory(); mavenLoggerFactory.setLogLevelRecorder( new LogLevelRecorder( "WARN" ) ); mavenLoggerFactory.setLogLevelRecorder( new LogLevelRecorder( "ERROR" ) ); }