RequestKey { public boolean equalsExtended(Object obj) { if (equals(obj)) { RequestKey other = (RequestKey) obj; boolean headersEqual = other.headers == null || headers == null || headers.equals(other.headers); boolean charsetEqual = other.charset == null || charset == null || charset.equals(other.charset); boolean bodyEqual = other.body == null || body == null || Arrays.equals(other.body, body); return headersEqual && charsetEqual && bodyEqual; } return false; } private  RequestKey(Builder builder); private  RequestKey(Request request); static Builder builder(HttpMethod method, String url); static RequestKey create(Request request); HttpMethod getMethod(); String getUrl(); RequestHeaders getHeaders(); Charset getCharset(); byte[] getBody(); @Override int hashCode(); @Override boolean equals(Object obj); boolean equalsExtended(Object obj); @Override String toString();  }
@Test public void equalsExtended() { RequestKey requestKey2 = RequestKey.builder(HttpMethod.GET, "a").build(); assertThat(requestKey.hashCode(), equalTo(requestKey2.hashCode())); assertThat(requestKey.equalsExtended(requestKey2), equalTo(true)); }