@Test void testHashCodeSame() { User userOne = new User(EMAIL, PASSWORD, Collections.singletonMap("customKey", 1)); User userTwo = new User(EMAIL, PASSWORD, Collections.singletonMap("customKey", 1)); assertEquals(userOne.hashCode(), userTwo.hashCode()); }
@Override public int hashCode() { return Objects.hash(email, password, properties); }
User { @Override public int hashCode() { return Objects.hash(email, password, properties); } }
User { @Override public int hashCode() { return Objects.hash(email, password, properties); } @JsonCreator  User(@JsonProperty("email") Email email,
              @JsonProperty("password") String password,
              @JsonProperty("properties") Map<String, Object> properties); }
User { @Override public int hashCode() { return Objects.hash(email, password, properties); } @JsonCreator  User(@JsonProperty("email") Email email,
              @JsonProperty("password") String password,
              @JsonProperty("properties") Map<String, Object> properties); Email getEmail(); String getPassword(); @JsonAnyGetter Map<String, Object> getProperties(); @JsonAnySetter void setProperty(String name, Object value); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); }
User { @Override public int hashCode() { return Objects.hash(email, password, properties); } @JsonCreator  User(@JsonProperty("email") Email email,
              @JsonProperty("password") String password,
              @JsonProperty("properties") Map<String, Object> properties); Email getEmail(); String getPassword(); @JsonAnyGetter Map<String, Object> getProperties(); @JsonAnySetter void setProperty(String name, Object value); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }