@Test public void testEquals() throws Exception { User u1 = createUser(EXPECTED_REMOTE_ADDRESS, "a1"); User u2 = createUser(EXPECTED_REMOTE_ADDRESS, "a1"); assertThat(u1.equals(u1), is(true)); assertThat(u1.equals("string"), is(false)); assertThat(u1.equals(null), is(false)); assertThat(u1.equals(u2), is(true)); u1 = createUser("r1", "a1"); u2 = createUser("r1", "a2"); assertThat(u1.equals(u2), is(false)); u1 = createUser("r1", "a1"); u2 = createUser("r2", "a1"); assertThat(u1.equals(u2), is(false)); }
@Override public boolean equals(Object o) { return EqualsBuilder.reflectionEquals(this, o); }
User { @Override public boolean equals(Object o) { return EqualsBuilder.reflectionEquals(this, o); } }
User { @Override public boolean equals(Object o) { return EqualsBuilder.reflectionEquals(this, o); } User();  User(String remoteAddr, String activityUuid);  User(PirasoRequest request); }
User { @Override public boolean equals(Object o) { return EqualsBuilder.reflectionEquals(this, o); } 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 boolean equals(Object o) { return EqualsBuilder.reflectionEquals(this, o); } 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; }