@Test
public void testEquals() {

    final SessionIdentifier id1 = new SessionIdentifier(12L, "MySession", SessionIdentifier.Context.WEB);
    final SessionIdentifier id2 = new SessionIdentifier(12L, "MySession", SessionIdentifier.Context.WEB);
    final SessionIdentifier id3 = new SessionIdentifier(12L, "YourSession", SessionIdentifier.Context.WEB);
    final SessionIdentifier id4 = new SessionIdentifier(13L, "MySession", SessionIdentifier.Context.WEB);
    final SessionIdentifier id5 = new SessionIdentifier(13L, "MySession", SessionIdentifier.Context.STREAM);
    assertTrue("Should be equal", id1.equals(id1));
    assertTrue("Should be equal", id1.equals(id2));
    assertFalse("Should NOT be equal", id1.equals(null));
    assertFalse("Should NOT be equal", id1.equals(id3));
    assertFalse("Should NOT be equal", id1.equals(id4));
    assertFalse("Should NOT be equal", id3.equals(id4));
    assertFalse("Should NOT be equal", id4.equals(id5));
}