MultiValuedTimestamp implements Timestamp { @Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (!(obj instanceof MultiValuedTimestamp)) { return false; } final MultiValuedTimestamp that = (MultiValuedTimestamp) obj; return Objects.equals(value1, that.value1) && Objects.equals(value2, that.value2); } MultiValuedTimestamp(final T value1, final U value2); @SuppressWarnings("unused") private  MultiValuedTimestamp(); @Override int compareTo(final Timestamp o); @Override int hashCode(); @Override boolean equals(final Object obj); @Override String toString(); T value1(); U value2();  }
@Test public void testEquals() { new EqualsTester().addEqualityGroup(stats1, stats1).addEqualityGroup(stats2).testEquals(); }