@ParameterizedTest
    @ValueSource(strings = {"3.4-IV0", "3.5-IV2"})
    public void testLeaderEpochBumpOnIsrShrink(String metadataVersionString) {
        MetadataVersion metadataVersion = MetadataVersion.fromVersionString(metadataVersionString);
        testTriggerLeaderEpochBumpIfNeeded(
            createFooBuilder(metadataVersion).setTargetIsrWithBrokerStates(
                AlterPartitionRequest.newIsrToSimpleNewIsrWithBrokerEpochs(Arrays.asList(2, 1))),
            new PartitionChangeRecord(),
            1);
    }
Test that shrinking the ISR does increase the leader epoch in earlier MVs.
See KAFKA-15021 for details.
metadata/src/test/java/org/apache/kafka/controller/PartitionChangeBuilderTest.java