* Test parsing cookie <tt>"Port"</tt> attribute.
*/
public void testParsePort() throws Exception {
CookieSpec cookiespec = new RFC2965Spec();
CookieOrigin origin = new CookieOrigin("www.domain.com", 80, "/", false);
Header header = new BasicHeader("Set-Cookie2", "name=value;Port=\"80,800,8000\";Version=1;Port=nonsense");
List<Cookie> cookies = cookiespec.parse(header, origin);
assertNotNull(cookies);
assertEquals(1, cookies.size());
// only the first occurrence of port attribute is considered, others ignored
ClientCookie cookie = (ClientCookie) cookies.get(0);