public static boolean isQuorumCandidate(final ClusterMember[] clusterMembers, final ClusterMember candidate)
    {
        int possibleVotes = 0;

        for (final ClusterMember member : clusterMembers)
        {
            if (NULL_POSITION == member.logPosition || compareLog(candidate, member) < 0)
            {
                continue;
            }

            ++possibleVotes;
        }

        return possibleVotes >= ClusterMember.quorumThreshold(clusterMembers.length);
    }
@Test
    void isQuorumCandidateReturnTrueWhenQuorumIsReached()
    {
        final ClusterMember candidate = newMember(2, 10, 800);
        final ClusterMember[] members = new ClusterMember[]
        {
            newMember(10, 2, 100),
            newMember(20, 18, 6),
            newMember(30, 10, 800),
            newMember(40, 9, 800),
            newMember(50, 10, 700)
        };

        assertTrue(isQuorumCandidate(members, candidate));
    }