* Tests generic cookie formatting.
*/
public void testFormatSeveralCookies() throws Exception {
Header header = new BasicHeader("Set-Cookie",
"name1=value1; path=/; domain=.mydomain.com, name2 = value2 ; path=/; domain=.mydomain.com");
CookieSpec cookiespec = new BrowserCompatSpec();
CookieOrigin origin = new CookieOrigin("myhost.mydomain.com", 80, "/", false);
List<Cookie> cookies = cookiespec.parse(header, origin);
List<Header> headers = cookiespec.formatCookies(cookies);
assertNotNull(headers);
assertEquals(1, headers.size());
assertEquals("name1=value1; name2=value2", headers.get(0).getValue());
}