@Override
    public boolean apply(Collection<Member> members) {
        if (members.size() < minimumClusterSize) {
            return false;
        }

        int count = 0;
        long timestamp = Clock.currentTimeMillis();
        for (Member member : members) {
            if (!isAlivePerIcmp(member)) {
                continue;
            }

            if (member.localMember() || failureDetector.isAlive(member, timestamp)) {
                count++;
            }
        }
        return count >= minimumClusterSize;
    }
@Test
    public void testSplitBrainProtectionPresent_whenHeartbeatsOnTime() throws Exception {
        // will do 5 heartbeats with 1 sec interval starting from now
        long now = System.currentTimeMillis();
        // initialize clock offset +5seconds -> last heartbeat has just been received
        long clockOffset = 5 * 1000;
        initClockOffsetTest(clockOffset);
        createSplitBrainProtectionFunctionProxy(5000, 1000);
        heartbeat(5, 1000);
        assertTrue(splitBrainProtectionFunction.apply(Arrays.asList(members)));
    }