boolean isAcceptable(final long leaderMemberId, final long memberId)
    {
        switch (sourceType)
        {
            case LEADER:
                return NULL_VALUE != leaderMemberId && leaderMemberId == memberId;
            case FOLLOWER:
                return NULL_VALUE == leaderMemberId || leaderMemberId != memberId;
            case ANY:
                return true;
        }

        throw new IllegalStateException("Unknown sourceType=" + sourceType);
    }
@Test
    void followerLogSourceTypeShouldOnlyAcceptFollowerAndUnknown()
    {
        final LogSourceValidator logSourceValidator = new LogSourceValidator(ClusterBackup.SourceType.FOLLOWER);

        final long leaderMemberId = 123;
        final long followerMemberId = 456;

        assertFalse(logSourceValidator.isAcceptable(leaderMemberId, leaderMemberId));
        assertTrue(logSourceValidator.isAcceptable(leaderMemberId, followerMemberId));
        assertTrue(logSourceValidator.isAcceptable(NULL_VALUE, NULL_VALUE));
        assertTrue(logSourceValidator.isAcceptable(leaderMemberId, NULL_VALUE));
        assertTrue(logSourceValidator.isAcceptable(NULL_VALUE, followerMemberId));
    }