assertEquals(user1principal1.hashCode(), user1principal2.hashCode());
}
public void testEqualsAndHashcodeWithSameWrappedObject()
{
UsernamePrincipal wrappedPrincipal = new UsernamePrincipal("user1");
AuthenticatedPrincipal user1principal1 = new AuthenticatedPrincipal(wrappedPrincipal);
AuthenticatedPrincipal user1principal2 = new AuthenticatedPrincipal(wrappedPrincipal);
assertTrue(user1principal1.equals(user1principal1));
assertTrue(user1principal1.equals(user1principal2));