class SysSnapshots {

    private static final Logger LOGGER = LogManager.getLogger(SysSnapshots.class);
    private final Supplier<Collection<Repository>> getRepositories;

    @Inject
    public SysSnapshots(RepositoriesService repositoriesService) {
        this(repositoriesService::getRepositoriesList);
    }

    @VisibleForTesting
    SysSnapshots(Supplier<Collection<Repository>> getRepositories) {
        this.getRepositories = getRepositories;
    }

    public CompletableFuture<Iterable<SysSnapshot>> currentSnapshots() {<FILL_FUNCTION_BODY>}

    private static SysSnapshot toSysSnapshot(Repository repository,
                                             SnapshotId snapshotId,
                                             SnapshotInfo snapshotInfo,
                                             List<String> partedTables) {
        Version version = snapshotInfo.version();
        return new SysSnapshot(
            snapshotId.getName(),
            repository.getMetadata().name(),
            snapshotInfo.indices(),
            partedTables,
            snapshotInfo.startTime(),
            snapshotInfo.endTime(),
            version == null ? null : version.toString(),
            snapshotInfo.state().name(),
            Lists.map(snapshotInfo.shardFailures(), SnapshotShardFailure::toString)
        );
    }

    private static CompletableFuture<SysSnapshot> createSysSnapshot(Repository repository, SnapshotId snapshotId) {
        return repository.getSnapshotGlobalMetadata(snapshotId).thenCombine(
            repository.getSnapshotInfo(snapshotId),
            (metadata, snapshotInfo) -> {
                List<String> partedTables = new ArrayList<>();
                for (var template : metadata.templates().values()) {
                    partedTables.add(RelationName.fqnFromIndexName(template.value.name()));
                }
                return SysSnapshots.toSysSnapshot(repository, snapshotId, snapshotInfo, partedTables);
            }).exceptionally(t -> {
                var err = SQLExceptions.unwrap(t);
                if (err instanceof SnapshotException) {
                    if (LOGGER.isDebugEnabled()) {
                        LOGGER.debug("Couldn't retrieve snapshotId={} error={}", snapshotId, err);
                    }
                    return new SysSnapshot(
                        snapshotId.getName(),
                        repository.getMetadata().name(),
                        Collections.emptyList(),
                        Collections.emptyList(),
                        null,
                        null,
                        null,
                        SnapshotState.FAILED.name(),
                        List.of()
                    );
                }
                throw Exceptions.toRuntimeException(err);
            });
    }
}

        ArrayList<CompletableFuture<List<SysSnapshot>>> sysSnapshots = new ArrayList<>();
        for (Repository repository : getRepositories.get()) {
            var futureSnapshots = repository.getRepositoryData()
                .thenCompose(repositoryData -> {
                    Collection<SnapshotId> snapshotIds = repositoryData.getSnapshotIds();
                    ArrayList<CompletableFuture<SysSnapshot>> snapshots = new ArrayList<>(snapshotIds.size());
                    for (SnapshotId snapshotId : snapshotIds) {
                        snapshots.add(createSysSnapshot(repository, snapshotId));
                    }
                    return CompletableFutures.allSuccessfulAsList(snapshots);
                });
            sysSnapshots.add(futureSnapshots);
        }
        return CompletableFutures.allSuccessfulAsList(sysSnapshots).thenApply(data -> {
            ArrayList<SysSnapshot> result = new ArrayList<>();
            for (Collection<SysSnapshot> datum : data) {
                result.addAll(datum);
            }
            return result;
        });
    
<no_super_class>