MultiSearch extends AbstractAction<MultiSearchResult> { @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (obj == this) { return true; } if (obj.getClass() != getClass()) { return false; } MultiSearch rhs = (MultiSearch) obj; return super.equals(obj) && Objects.equals(searches, rhs.searches); } protected  MultiSearch(Builder builder); @Override MultiSearchResult createNewElasticSearchResult(String responseBody, int statusCode, String reasonPhrase, Gson gson); @Override String getRestMethodName(); @Override String getData(Gson gson); @Override int hashCode(); @Override boolean equals(Object obj);  }
@Test public void equals() { Search search1 = new Search.Builder("{\"match_all\" : {}}") .addIndex("twitter") .build(); Search search2 = new Search.Builder("{\"match_all\" : {}}").build(); MultiSearch multiSearch1 = new MultiSearch.Builder(Arrays.asList(search1, search2)).build(); MultiSearch multiSearch1Duplicate = new MultiSearch.Builder(Arrays.asList(search1, search2)).build(); assertEquals(multiSearch1, multiSearch1Duplicate); }