Stamp implements Serializable { public Stamp[] peek() { return new Stamp[] { new Stamp(id, event), new Stamp(IDs.zero(), event) }; } Stamp();   Stamp(ID id, Event event); Stamp[] fork(); Stamp[] peek(); Stamp join(Stamp other); Stamp event(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); Stamp[] send(); Stamp receive(Stamp other); Stamp[] sync(Stamp other); boolean leq(Stamp other);  }
@Test public void testPeek() { for (Stamp stamp : stamps) { Stamp[] peek = stamp.peek(); assertIntEquals(2, peek.length); assertTrue(peek[0].equals(stamp)); assertTrue(peek[1].getId().isZero()); assertTrue(peek[1].getEvent().equals(stamp.getEvent())); assertNormalizedStamp(peek[0]); assertNormalizedStamp(peek[1]); } }