class VClock {

    public long lastUpdate() {
        long last = 0;
        for (Map.Entry<String, Long> clock : this.vc.entrySet()) {
            if (clock.getValue() > last) {
                last = clock.getValue();
            }
        }
        return last;
    }

}

class VClockTest {

     VClock testClock;

    @Test
    public void lastUpdate() throws Exception {

        testClock.set("Proc1", 2);
        testClock.set("Proc3", 3);
        testClock.set("Proc2", 7);
        long clockTicks = testClock.lastUpdate();
        assertEquals("Copy failed! The clock values do not match.", 7L, clockTicks);

    }

}