VClock { public VClock copy() { VClock clock = new VClock(); clock.vc.putAll(this.vc); return clock; } 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 copy() throws Exception { testClock.set("Proc1", 50); VClock nc = testClock.copy(); long clockTicks = testClock.findTicks("Proc1"); long clockTicksCopy = nc.findTicks("Proc1"); assertEquals("Copy failed! The clock values do not match.", clockTicks, clockTicksCopy); }