ErrorResult extends OperationResult { @Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof ErrorResult)) { return false; } ErrorResult that = (ErrorResult) other; return Objects.equals(error, that.getError()) && Objects.equals(details, that.getDetails()); } @JsonCreator  ErrorResult(
      @JsonProperty(value = "error", required = true) String error,
      @JsonProperty(value = "details", required = true) String details
  ); String getError(); String getDetails(); @Override boolean equals(Object other); @Override int hashCode(); @Override String toString();  }
@Test public void testEquals() { new EqualsTester() .addEqualityGroup(new ErrorResult(error, details), new ErrorResult(error, details)) .testEquals(); }