opensearch-java icon indicating copy to clipboard operation
opensearch-java copied to clipboard

[FEATURE] equals/hashCode on API objects

Open ginkel opened this issue 2 years ago • 3 comments

Is your feature request related to a problem?

While developing unit tests for code that makes use of opensearch-java we noticed that the invocations are pretty hard to mock/verify (e.g., using Mockito) as the API objects do not implement equals/hashCode. This causes the effect that it is very hard to verify that a method has been invoked with a certain API object as its argument just uses Object.equals for its equals implementation.

What solution would you like?

Implement equals/hashCode on all API POJOs.

ginkel avatar Jan 04 '23 10:01 ginkel