public static BootstrapMetadata fromRecords(List<ApiMessageAndVersion> records, String source) {
        MetadataVersion metadataVersion = null;
        for (ApiMessageAndVersion record : records) {
            Optional<MetadataVersion> version = recordToMetadataVersion(record.message());
            if (version.isPresent()) {
                metadataVersion = version.get();
            }
        }
        if (metadataVersion == null) {
            throw new RuntimeException("No FeatureLevelRecord for " + MetadataVersion.FEATURE_NAME +
                    " was found in the bootstrap metadata from " + source);
        }
        return new BootstrapMetadata(records, metadataVersion, source);
    }
@Test
    public void testFromRecordsListWithOldMetadataVersion() {
        RuntimeException exception = assertThrows(RuntimeException.class,
            () -> BootstrapMetadata.fromRecords(RECORDS_WITH_OLD_METADATA_VERSION, "quux"));
        assertEquals("Bootstrap metadata.version before 3.3-IV0 are not supported. Can't load " +
            "metadata from quux", exception.getMessage());
    }