1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 package org.htmlunit.util;
16
17 import org.htmlunit.SimpleWebTestCase;
18 import org.junit.jupiter.api.Test;
19
20
21
22
23
24
25 public class CookieTest extends SimpleWebTestCase {
26
27
28
29
30 @Test
31 public void nullPath() throws Exception {
32 final Cookie cookie1 = new Cookie("localhost", "a", "one");
33 final Cookie cookie2 = new Cookie("localhost", "a", "one", null, null, false);
34 final Cookie cookie3 = new Cookie("localhost", "a", "one", "/", null, false);
35 assertEquals(cookie1, cookie2);
36 assertEquals(cookie2, cookie3);
37 assertEquals(cookie1.hashCode(), cookie2.hashCode());
38 assertEquals(cookie2.hashCode(), cookie3.hashCode());
39 }
40 }