static MockSnapshotReader fromRecordLists(
            MetadataProvenance provenance,
            List<List<ApiMessageAndVersion>> lists
        ) {
            List<Batch<ApiMessageAndVersion>> batches = lists
                .stream()
                .map(records -> Batch.data(0, 0, 0, 0, records))
                .collect(Collectors.toList());

            return new MockSnapshotReader(provenance, batches);
        }
Install 2 publishers and check that the publishers that were installed are closed when the
loader is closed.
metadata/src/test/java/org/apache/kafka/image/loader/MetadataLoaderTest.java