@Test
    public void testPremodernVersion() {
        writeWithExpectedLosses(MetadataVersion.IBP_3_2_IV0,
            Collections.singletonList(
                "feature flag(s): foo.feature"),
            Arrays.asList(
                metadataVersionRecord(MetadataVersion.IBP_3_3_IV0),
                TEST_RECORDS.get(0),
                TEST_RECORDS.get(1),
                new ApiMessageAndVersion(new FeatureLevelRecord().
                        setName("foo.feature").
                        setFeatureLevel((short) 4), (short) 0)),
            Arrays.asList(
                TEST_RECORDS.get(0),
                TEST_RECORDS.get(1))
        );
    }
Test downgrading to a MetadataVersion that doesn't support FeatureLevelRecord.
metadata/src/test/java/org/apache/kafka/image/ImageDowngradeTest.java