@Override
    public Flux<BackupFile> getBackupFiles() {
        return Flux.using(
                () -> Files.list(getBackupsRoot()),
                Flux::fromStream,
                BaseStream::close
            )
            .filter(Files::isRegularFile)
            .filter(Files::isReadable)
            .filter(path -> isExtension(path.getFileName().toString(), "zip"))
            .map(this::toBackupFile)
            .sort(comparing(BackupFile::getLastModifiedTime).reversed()
                .thenComparing(BackupFile::getFilename)
            )
            .subscribeOn(this.scheduler);
    }
@Test
    void getBackupFilesTest() throws Exception {
        var now = Instant.now();
        var backup1 = tempDir.resolve("backup1.zip");
        Files.writeString(backup1, "fake-content");
        Files.setLastModifiedTime(backup1, FileTime.from(now));

        var backup2 = tempDir.resolve("backup2.zip");
        Files.writeString(backup2, "fake--content");
        Files.setLastModifiedTime(
            backup2,
            FileTime.from(now.plus(Duration.ofSeconds(1)))
        );

        var backup3 = tempDir.resolve("backup3.not-a-zip");
        Files.writeString(backup3, "fake-content");
        Files.setLastModifiedTime(
            backup3,
            FileTime.from(now.plus(Duration.ofSeconds(2)))
        );
        when(backupRoot.get()).thenReturn(tempDir);

        migrationService.afterPropertiesSet();
        migrationService.getBackupFiles()
            .as(StepVerifier::create)
            .assertNext(backupFile -> {
                assertEquals("backup2.zip", backupFile.getFilename());
                assertEquals(13, backupFile.getSize());
                assertEquals(now.plus(Duration.ofSeconds(1)), backupFile.getLastModifiedTime());
            })
            .assertNext(backupFile -> {
                assertEquals("backup1.zip", backupFile.getFilename());
                assertEquals(12, backupFile.getSize());
                assertEquals(now, backupFile.getLastModifiedTime());
            })
            .verifyComplete();
    }