public BootstrapMetadata copyWithOnlyVersion() {
        ApiMessageAndVersion versionRecord = null;
        for (ApiMessageAndVersion record : records) {
            if (recordToMetadataVersion(record.message()).isPresent()) {
                versionRecord = record;
            }
        }
        if (versionRecord == null) {
            throw new RuntimeException("No FeatureLevelRecord for " + MetadataVersion.FEATURE_NAME +
                    " was found in " + source);
        }
        return new BootstrapMetadata(Collections.singletonList(versionRecord),
                metadataVersion, source);
    }
@Test
    public void testCopyWithOnlyVersion() {
        assertEquals(new BootstrapMetadata(SAMPLE_RECORDS1.subList(2, 3), IBP_3_3_IV2, "baz"),
                BootstrapMetadata.fromRecords(SAMPLE_RECORDS1, "baz").copyWithOnlyVersion());
    }