@Test public void testHashCode() throws Exception { User e1 = createUser(EXPECTED_REMOTE_ADDRESS, "a1"); User e2 = createUser(EXPECTED_REMOTE_ADDRESS); User e3 = createUser(EXPECTED_REMOTE_ADDRESS, "a1"); Set<User> set = new HashSet<User>(); set.add(e1); set.add(e2); set.add(e3); assertThat(set.size(), is(2)); }
@Override public int hashCode() { return HashCodeBuilder.reflectionHashCode(this); }
User { @Override public int hashCode() { return HashCodeBuilder.reflectionHashCode(this); } }
User { @Override public int hashCode() { return HashCodeBuilder.reflectionHashCode(this); } User();  User(String remoteAddr, String activityUuid);  User(PirasoRequest request); }
User { @Override public int hashCode() { return HashCodeBuilder.reflectionHashCode(this); } User();  User(String remoteAddr, String activityUuid);  User(PirasoRequest request); void setRemoteAddr(String remoteAddr); void setActivityUuid(String activityUuid); String getRemoteAddr(); String getActivityUuid(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); }
User { @Override public int hashCode() { return HashCodeBuilder.reflectionHashCode(this); } User();  User(String remoteAddr, String activityUuid);  User(PirasoRequest request); void setRemoteAddr(String remoteAddr); void setActivityUuid(String activityUuid); String getRemoteAddr(); String getActivityUuid(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode(); public String remoteAddr; public String activityUuid; }