### Question:
Versioned implements Serializable { @Override public boolean equals(Object o) { if(o == this) return true; else if(!(o instanceof Versioned<?>)) return false; Versioned<?> versioned = (Versioned<?>) o; return Objects.equal(getVersion(), versioned.getVersion()) && deepEquals(getValue(), versioned.getValue()); } Versioned(T object);  Versioned(T object, 
                     IVersion version); IVersion getVersion(); void increment(int nodeId, long time); T getValue(); void setValue(T object); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); Versioned<T> cloneVersioned(); static Versioned<S> value(S s); static Versioned<S> value(S s, IVersion v); static Versioned<S> emptyVersioned();  }### Answer:
@Test public void testEquals() { assertEquals("Null versioneds not equal.", getVersioned(null), getVersioned(null)); assertEquals("equal versioneds not equal.", getVersioned(1), getVersioned(1)); assertEquals("equal versioneds not equal.", getVersioned(1, 1, 2), getVersioned(1, 1, 2)); assertTrue("Equals values with different version are equal!", !getVersioned(1, 1, 2).equals(getVersioned(1, 1, 2, 2))); assertTrue("Different values with same version are equal!", !getVersioned(1, 1, 2).equals(getVersioned(2, 1, 2))); assertTrue("Different values with different version are equal!", !getVersioned(1, 1, 2).equals(getVersioned(2, 1, 1, 2))); assertEquals("Equal arrays are not equal!", new Versioned<byte[]>(new byte[] { 1 }, new VectorClock(now)), new Versioned<byte[]>(new byte[] { 1 }, new VectorClock(now))); }