public void merge(VectorClock other) {
        for (Entry<UUID, Long> entry : other.replicaTimestamps.entrySet()) {
            final UUID replicaId = entry.getKey();
            final long mergingTimestamp = entry.getValue();
            final long localTimestamp = replicaTimestamps.containsKey(replicaId)
                    ? replicaTimestamps.get(replicaId)
                    : Long.MIN_VALUE;
            replicaTimestamps.put(replicaId, Math.max(localTimestamp, mergingTimestamp));
        }
    }
@Test
    public void testMerge() {
        assertMerged(
                vectorClock(uuidParams[0], 1),
                vectorClock(),
                vectorClock(uuidParams[0], 1));
        assertMerged(
                vectorClock(uuidParams[0], 1),
                vectorClock(uuidParams[0], 2),
                vectorClock(uuidParams[0], 2));
        assertMerged(
                vectorClock(uuidParams[0], 2),
                vectorClock(uuidParams[0], 1),
                vectorClock(uuidParams[0], 2));
        assertMerged(
                vectorClock(uuidParams[0], 3, uuidParams[1], 1),
                vectorClock(uuidParams[0], 1, uuidParams[1], 2, uuidParams[2], 3),
                vectorClock(uuidParams[0], 3, uuidParams[1], 2, uuidParams[2], 3));
    }