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; } VClock(); void tick(String pid); void set(String pid, long ticks); VClock copy(); long findTicks(String pid); long lastUpdate(); void merge(VClock other); String returnVCString(); void printVC(); TreeMap<String, Long> getClockMap();  }
@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); }