public boolean isAfter(VectorClock other) {
        boolean anyTimestampGreater = false;
        for (Entry<UUID, Long> otherEntry : other.replicaTimestamps.entrySet()) {
            final UUID replicaId = otherEntry.getKey();
            final Long otherReplicaTimestamp = otherEntry.getValue();
            final Long localReplicaTimestamp = this.getTimestampForReplica(replicaId);

            if (localReplicaTimestamp == null || localReplicaTimestamp < otherReplicaTimestamp) {
                return false;
            } else if (localReplicaTimestamp > otherReplicaTimestamp) {
                anyTimestampGreater = true;
            }
        }
        // there is at least one local timestamp greater or local vector clock has additional timestamps
        return anyTimestampGreater || other.replicaTimestamps.size() < replicaTimestamps.size();
    }
@Test
    public void testIsAfter() {
        assertFalse(vectorClock().isAfter(vectorClock()));
        assertTrue(vectorClock(uuidParams[0], 1).isAfter(vectorClock()));
        assertFalse(vectorClock(uuidParams[0], 1).isAfter(vectorClock(uuidParams[0], 1)));
        assertFalse(vectorClock(uuidParams[0], 1).isAfter(vectorClock(uuidParams[1], 1)));
        assertTrue(vectorClock(uuidParams[0], 1, uuidParams[1], 1).isAfter(vectorClock(uuidParams[0], 1)));
        assertFalse(vectorClock(uuidParams[0], 1).isAfter(vectorClock(uuidParams[0], 1, uuidParams[1], 1)));
        assertTrue(vectorClock(uuidParams[0], 2).isAfter(vectorClock(uuidParams[0], 1)));
        assertFalse(vectorClock(uuidParams[0], 2).isAfter(vectorClock(uuidParams[0], 1, uuidParams[1], 1)));
        assertTrue(vectorClock(uuidParams[0], 2, uuidParams[1], 1).isAfter(vectorClock(uuidParams[0], 1, uuidParams[1], 1)));
    }