public LeaderAndIsr newEpoch() {
        return newLeaderAndIsrWithBrokerEpoch(leader, isrWithBrokerEpoch);
    }
@Test
    public void testNewEpoch() {
        LeaderAndIsr leaderAndIsr = new LeaderAndIsr(3, Arrays.asList(1, 2, 3));

        assertEquals(0, leaderAndIsr.leaderEpoch());

        LeaderAndIsr leaderWithNewEpoch = leaderAndIsr.newEpoch();

        assertEquals(1, leaderWithNewEpoch.leaderEpoch());
    }