@Test
public void testParseMultipleDifferentPaths() throws Exception {

    Header header = new BasicHeader("Set-Cookie",
        "name1=value1;Version=1;Path=/commons,name1=value2;Version=1;" +
        "Path=/commons/httpclient;Version=1");
    CookieSpec cookiespec = new BrowserCompatSpec();
    CookieOrigin origin = new CookieOrigin("www.apache.org", 80, "/commons/httpclient", true);
    List<Cookie> cookies = cookiespec.parse(header, origin);
    for (int i = 0; i < cookies.size(); i++) {
        cookiespec.validate(cookies.get(i), origin);
    }
    Assert.assertEquals("Wrong number of cookies.",2,cookies.size());
    Assert.assertEquals("Name","name1",cookies.get(0).getName());
    Assert.assertEquals("Value","value1",cookies.get(0).getValue());
    Assert.assertEquals("Name","name1",cookies.get(1).getName());
    Assert.assertEquals("Value","value2",cookies.get(1).getValue());
}