RequestHeader extends Header { public List<Cookie> cookies(){ return allCookies().toList(); } RequestHeader();  RequestHeader(HeaderField ... fields);  RequestHeader(List<HeaderField> fields); AuthorizationField authorization(); List<Cookie> cookiesNamed(final String name); List<Cookie> cookies();  }
@Test public void makesItEasyToGetAllTheCookies() { final Cookie nameCookie = new Cookie("name", "ralph"); final Cookie ageCookie = new Cookie("age", "21"); RequestHeader testSubject = new RequestHeader( new CookieField( nameCookie, ageCookie ) ); final List<Cookie> results = testSubject.cookies(); assertNotNull(results); assertEquals(2, results.size()); assertTrue(results.get(0) == nameCookie); assertTrue(results.get(1) == ageCookie); }