synchronized Optional<RawSnapshotReader> nextSnapshot(long offset) {
            return Optional.ofNullable(snapshots.lastEntry()).flatMap(entry -> {
                if (offset <= entry.getKey()) {
                    return Optional.of(entry.getValue());
                }

                return Optional.empty();
            });
        }
Optionally return a snapshot reader if the offset if less than the first batch.
metadata/src/test/java/org/apache/kafka/metalog/LocalLogManager.java