List expectedCookies) {
HTTPMessageEntities cookies = response.getCookies();
// the multiple cookies should have the same identity
Cookie cookie = (Cookie) expectedCookies.get(0);
CookieIdentity expectedIdentity = (CookieIdentity) cookie.getIdentity();
int expectedCount = expectedCookies.size();
Cookie[] cookieArray = (Cookie[]) cookies.retrieve(expectedIdentity);
assertNotNull("Should be " + expectedName + " cookies", cookieArray);