### Question:
RotatingFileOutputStreamSupplier implements Supplier<OutputStream>, Closeable { public static List<File> getAllArchives( FileSystemAbstraction fileSystem, File outputFile ) { ArrayList<File> ret = new ArrayList<>(); int i = 1; while ( true ) { File file = archivedOutputFile( outputFile, i ); if ( !fileSystem.fileExists( file ) ) { break; } ret.add( file ); i++; } return ret; } RotatingFileOutputStreamSupplier( FileSystemAbstraction fileSystem, File outputFile,
            long rotationThresholdBytes, long rotationDelay, int maxArchives, Executor rotationExecutor );  RotatingFileOutputStreamSupplier( FileSystemAbstraction fileSystem, File outputFile,
            long rotationThresholdBytes, long rotationDelay, int maxArchives, Executor rotationExecutor,
            RotationListener rotationListener );   RotatingFileOutputStreamSupplier( LongSupplier currentTimeSupplier, FileSystemAbstraction fileSystem,
            File outputFile, long rotationThresholdBytes, long rotationDelay, int maxArchives,
            Executor rotationExecutor, RotationListener rotationListener ); @Override OutputStream get(); @Override void close(); static List<File> getAllArchives( FileSystemAbstraction fileSystem,  File outputFile );  }### Answer:
@Test void shouldFindAllArchives() throws Exception { RotatingFileOutputStreamSupplier supplier = new RotatingFileOutputStreamSupplier( fileSystem, logFile, 10, 0, 2, DIRECT_EXECUTOR ); write( supplier, "A string longer than 10 bytes" ); write( supplier, "A string longer than 10 bytes" ); assertThat( fileSystem.fileExists( logFile ), is( true ) ); assertThat( fileSystem.fileExists( archiveLogFile1 ), is( true ) ); assertThat( fileSystem.fileExists( archiveLogFile2 ), is( false ) ); List<File> allArchives = getAllArchives( fileSystem, logFile ); assertThat( allArchives.size(), is( 1 ) ); assertThat( allArchives, hasItem( archiveLogFile1 ) ); }