InsertResult extends OperationResult { @Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof InsertResult)) { return false; } InsertResult that = (InsertResult) other; return Objects.equals(uuid, that.getUuid()); } @JsonCreator  InsertResult(@JsonProperty(value = "uuid", required = true) Uuid uuid); Uuid getUuid(); @Override boolean equals(Object other); @Override int hashCode(); @Override String toString();  }
@Test public void testEquals() { UUID uuid = UUID.randomUUID(); new EqualsTester() .addEqualityGroup(new InsertResult(Uuid.of(uuid)), new InsertResult(new Uuid(uuid))) .testEquals(); }