@ParameterizedTest
    @ValueSource(strings = {"3.6-IV0", "3.7-IV2", "3.9-IV1"})
    public void testLeaderEpochBumpOnIsrShrinkWithZkMigration(String metadataVersionString) {
        MetadataVersion metadataVersion = MetadataVersion.fromVersionString(metadataVersionString);
        testTriggerLeaderEpochBumpIfNeeded(
            createFooBuilder(metadataVersion).
                setZkMigrationEnabled(true).
                setTargetIsrWithBrokerStates(
                    AlterPartitionRequest.newIsrToSimpleNewIsrWithBrokerEpochs(Arrays.asList(2, 1))),
            new PartitionChangeRecord(),
            1);
    }
Test that shrinking the ISR does increase the leader epoch in later MVs when ZK migration is on.
metadata/src/test/java/org/apache/kafka/controller/PartitionChangeBuilderTest.java