Pair { @Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof Pair)) { return false; } Pair<?, ?> that = (Pair<?, ?>) other; return Objects.equals(key, that.getKey()) && Objects.equals(value, that.getValue()); } Pair(Atom<K> key, Atom<V> value); Atom<K> getKey(); Atom<V> getValue(); @Override boolean equals(Object other); @Override int hashCode(); @Override String toString();  }
@Test public void testEquals() { UUID uuid = UUID.randomUUID(); new EqualsTester() .addEqualityGroup( new Pair<>(Atom.string("uuid"), Atom.uuid(uuid)), new Pair<>(new Atom<>("uuid"), new Atom<>(Uuid.of(uuid))) ).testEquals(); }