@Test
public void testEquals() {

    Object nullObj = null;
    Cookie cookie = new Cookie("name", "value");
    Cookie cookie1 = new Cookie("name", "value");
    Cookie cookie2 = new Cookie("name", "value2");
    NewCookie newCookie = new NewCookie("name", "value");
    NewCookie newCookie1 = new NewCookie("name", "value");
    NewCookie newCookie2 = new NewCookie("name", "value2");
    assertFalse(cookie.equals(nullObj));
    assertFalse(cookie.equals(newCookie));
    assertFalse(cookie.equals(cookie2));
    assertTrue(cookie.equals(cookie1));
    assertTrue(cookie.equals(newCookie.toCookie()));
    assertTrue(newCookie.equals(newCookie1));
    assertFalse(newCookie.equals(newCookie2));
}