Cookie { public String get() { return DomGlobal.document.cookie; }  String get(); String get(final String name); void set(final String name,
                    final String value); void set(final String name,
                    final String value,
                    final int maxAge); void clear(final String name);  }
@Test public void emptyCookie() { doReturn("").when(cookie).get(); String value = cookie.get("key1"); assertEquals("", value); }
@Test public void inexistentSingleCookie() { doReturn("key1=val1").when(cookie).get(); String value = cookie.get("key2"); assertEquals("", value); }
@Test public void singleCookie() { doReturn("key1=val1").when(cookie).get(); String value = cookie.get("key1"); assertEquals("val1", value); }
@Test public void inexistentMultipleCookies() { doReturn("key1=val1; key2=val2; key3=val3").when(cookie).get(); String value = cookie.get("key4"); assertEquals("", value); }
@Test public void firstMultipleCookies() { doReturn("key1=val1; key2=val2; key3=val3").when(cookie).get(); String value = cookie.get("key1"); assertEquals("val1", value); }
@Test public void middleMultipleCookies() { doReturn("key1=val1; key2=val2; key3=val3").when(cookie).get(); String value = cookie.get("key2"); assertEquals("val2", value); }
@Test public void lastMultipleCookies() { doReturn("key1=val1; key2=val2; key3=val3").when(cookie).get(); String value = cookie.get("key3"); assertEquals("val3", value); }