@Test
public void testAppendCookie() throws Exception {

  Assert.assertEquals("newCookie", URLStreamProvider.appendCookie(null, "newCookie"));
  Assert.assertEquals("newCookie", URLStreamProvider.appendCookie("", "newCookie"));
  Assert.assertEquals("oldCookie; newCookie", URLStreamProvider.appendCookie("oldCookie", "newCookie"));
  Assert.assertEquals("oldCookie1; oldCookie2; newCookie", URLStreamProvider.appendCookie("oldCookie1; oldCookie2", "newCookie"));
}