boolean isReassignmentInProgress() {
        return isReassignmentInProgress(
            removing,
            adding);
    }
@Test
    public void testIsReassignmentInProgress() {
        assertTrue(PartitionReassignmentReplicas.isReassignmentInProgress(
            new PartitionRegistration.Builder().
                setReplicas(new int[]{0, 1, 3, 2}).
                setDirectories(new Uuid[]{
                    Uuid.fromString("HEKOeWDdQOqr2cmHrnjqjA"),
                    Uuid.fromString("I8kmmcM5TjOwNFnGvJLCjA"),
                    Uuid.fromString("x8osEoRkQdupZNYpU5c3Lw"),
                    Uuid.fromString("OT6qgtRqTiuiX8EikvAVow")}).
                setIsr(new int[]{0, 1, 3, 2}).
                setRemovingReplicas(new int[]{2}).
                setAddingReplicas(new int[]{3}).
                setLeader(0).
                setLeaderRecoveryState(LeaderRecoveryState.RECOVERED).
                setLeaderEpoch(0).
                setPartitionEpoch(0).
                build()));
        assertTrue(PartitionReassignmentReplicas.isReassignmentInProgress(
            new PartitionRegistration.Builder().
                setReplicas(new int[]{0, 1, 3, 2}).
                setDirectories(new Uuid[]{
                    Uuid.fromString("QrbOddSYQg6JgFu7hLvOTg"),
                    Uuid.fromString("S585FNNoSmiSH6ZYCrNqCg"),
                    Uuid.fromString("wjT5ieLARfKYMWIzTFwcag"),
                    Uuid.fromString("qzX9qWPVTWuLbiEQL0cgeg")
                }).
                setIsr(new int[]{0, 1, 3, 2}).
                setRemovingReplicas(new int[]{2}).
                setLeader(0).
                setLeaderRecoveryState(LeaderRecoveryState.RECOVERED).
                setLeaderEpoch(0).
                setPartitionEpoch(0).
                build()));
        assertTrue(PartitionReassignmentReplicas.isReassignmentInProgress(
            new PartitionRegistration.Builder().
                setReplicas(new int[]{0, 1, 3, 2}).
                setDirectories(new Uuid[]{
                    Uuid.fromString("QIyJnfdUSz6laFLCgj3AjA"),
                    Uuid.fromString("1QIvvBx2QVqNw2dsnYXUZg"),
                    Uuid.fromString("yPvPnGrxR0q8KC2Q5k0FIg"),
                    Uuid.fromString("a0lnxzleTcWVf1IyalE9cA")
                }).
                setIsr(new int[]{0, 1, 3, 2}).
                setAddingReplicas(new int[]{3}).
                setLeader(0).
                setLeaderRecoveryState(LeaderRecoveryState.RECOVERED).
                setLeaderEpoch(0).
                setPartitionEpoch(0).
                build()));
        assertFalse(PartitionReassignmentReplicas.isReassignmentInProgress(
            new PartitionRegistration.Builder().
                setReplicas(new int[]{0, 1, 2}).
                setDirectories(new Uuid[]{
                    Uuid.fromString("I4qCCBe9TYGOB0xvmvTI7w"),
                    Uuid.fromString("JvzGem0nTxiNPM5jIzNzlA"),
                    Uuid.fromString("EfWjZ2EsSKSvEn9PkG7lWQ")
                }).
                setIsr(new int[]{0, 1, 2}).
                setLeader(0).
                setLeaderRecoveryState(LeaderRecoveryState.RECOVERED).
                setLeaderEpoch(0).
                setPartitionEpoch(0).
                build()));
    }