### Question:
SecurityLog extends LifecycleAdapter implements Log { @Override public void info( String message ) { inner.info( message ); } SecurityLog( Config config, FileSystemAbstraction fileSystem, Executor executor );  SecurityLog( Log log ); @Override boolean isDebugEnabled(); @Override Logger debugLogger(); @Override void debug( String message ); @Override void debug( String message, Throwable throwable ); @Override void debug( String format, Object... arguments ); void debug( AuthSubject subject, String format, Object... arguments ); @Override Logger infoLogger(); @Override void info( String message ); @Override void info( String message, Throwable throwable ); @Override void info( String format, Object... arguments ); void info( AuthSubject subject, String format, Object... arguments ); void info( AuthSubject subject, String format ); @Override Logger warnLogger(); @Override void warn( String message ); @Override void warn( String message, Throwable throwable ); @Override void warn( String format, Object... arguments ); void warn( AuthSubject subject, String format, Object... arguments ); @Override Logger errorLogger(); @Override void error( String message ); @Override void error( String message, Throwable throwable ); @Override void error( String format, Object... arguments ); void error( AuthSubject subject, String format, Object... arguments ); @Override void bulk( Consumer<Log> consumer ); static SecurityLog create( Config config, Log log, FileSystemAbstraction fileSystem,
            JobScheduler jobScheduler ); @Override void shutdown();  }### Answer:
@Test public void shouldRotateLog() throws IOException { SecurityLog securityLog = new SecurityLog( config, fileSystemRule.get(), Runnable::run ); securityLog.info( "line 1" ); securityLog.info( "line 2" ); FileSystemAbstraction fs = fileSystemRule.get(); File activeLogFile = config.get( SecuritySettings.security_log_filename ); assertThat( fs.fileExists( activeLogFile ), equalTo( true ) ); assertThat( fs.fileExists( archive( 1 ) ), equalTo( true ) ); assertThat( fs.fileExists( archive( 2 ) ), equalTo( false ) ); String[] activeLines = readLogFile( fs, activeLogFile ); assertThat( activeLines, array( containsString( "line 2" ) ) ); String[] archiveLines = readLogFile( fs, archive( 1 ) ); assertThat( archiveLines, array( containsString( "line 1" ) ) ); }