synchronized Optional<OffsetAndEpoch> latestSnapshotId() {
            return Optional.ofNullable(snapshots.lastEntry()).map(entry -> entry.getValue().snapshotId());
        }
Returns the snapshot id of the latest snapshot if there is one.

If a snapshot doesn't exists, it return an empty Optional.
metadata/src/test/java/org/apache/kafka/metalog/LocalLogManager.java