Request implements JsonSerializable { private Request(Builder builder) { this.url = builder.url; this.method = builder.method; this.headers = builder.headers; this.params = builder.params; this.get = builder.get; this.queryString = builder.queryString; this.post = builder.post; this.body = builder.body; this.userIp = builder.userIp; this.metadata = builder.metadata != null ? unmodifiableMap(new HashMap<>(builder.metadata)) : null; } private  Request(Builder builder); String getUrl(); String getMethod(); Map<String, String> getHeaders(); Map<String, String> getParams(); Map<String, List<String>> getGet(); String getQueryString(); Map<String, Object> getPost(); String getBody(); String getUserIp(); Map<String, Object> getMetadata(); @Override Map<String, Object> asJson(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }
@Test public void shouldBeEqual() { Request request1 = request(); Request request2 = request(); assertThat(request2, is(request1)); }