@Test
public void toArray() throws Exception {

    CookieCollection cookies = new CookieCollection(cookie);
    Cookie[] array = cookies.toArray();
    Assert.assertEquals(cookies.size(), array.length);
    Assert.assertEquals(cookie, array[0]);
}