MemberRole { public MemberRole(String role, long expiration) { this.role = role; this.expiration = expiration; } MemberRole(String role, long expiration); String getRole(); long getExpiration(); @Override int hashCode(); @Override boolean equals(Object obj);  }
@Test public void testMemberRole() { MemberRole mr = new MemberRole("role", 100); assertEquals("role", mr.getRole()); assertEquals(100, mr.getExpiration()); assertEquals(3510355, mr.hashCode()); mr = new MemberRole(null, 200); assertNull(mr.getRole()); assertEquals(200, mr.getExpiration()); assertEquals(7161, mr.hashCode()); }