synchronized RawSnapshotReader waitForLatestSnapshot() throws InterruptedException {
            while (snapshots.isEmpty()) {
                this.wait();
            }

            return Objects.requireNonNull(snapshots.lastEntry()).getValue();
        }
Returns the latest snapshot.

If a snapshot doesn't exists, it waits until it does.
metadata/src/test/java/org/apache/kafka/metalog/LocalLogManager.java