@Test public void parsesCookieHeader() throws Exception { Cookie cookie = cookieHeaderDelegate.fromString("foo=bar"); assertEquals(new Cookie("foo", "bar"), cookie); }
@Override public Cookie fromString(String header) { if (header == null) { throw new IllegalArgumentException(); } List<Cookie> cookies = HeaderHelper.parseCookies(header); return Iterables.getFirst(cookies, null); }
CookieHeaderDelegate implements RuntimeDelegate.HeaderDelegate<Cookie> { @Override public Cookie fromString(String header) { if (header == null) { throw new IllegalArgumentException(); } List<Cookie> cookies = HeaderHelper.parseCookies(header); return Iterables.getFirst(cookies, null); } }
CookieHeaderDelegate implements RuntimeDelegate.HeaderDelegate<Cookie> { @Override public Cookie fromString(String header) { if (header == null) { throw new IllegalArgumentException(); } List<Cookie> cookies = HeaderHelper.parseCookies(header); return Iterables.getFirst(cookies, null); }  }
CookieHeaderDelegate implements RuntimeDelegate.HeaderDelegate<Cookie> { @Override public Cookie fromString(String header) { if (header == null) { throw new IllegalArgumentException(); } List<Cookie> cookies = HeaderHelper.parseCookies(header); return Iterables.getFirst(cookies, null); }  @Override Cookie fromString(String header); @Override String toString(Cookie cookie); }
CookieHeaderDelegate implements RuntimeDelegate.HeaderDelegate<Cookie> { @Override public Cookie fromString(String header) { if (header == null) { throw new IllegalArgumentException(); } List<Cookie> cookies = HeaderHelper.parseCookies(header); return Iterables.getFirst(cookies, null); }  @Override Cookie fromString(String header); @Override String toString(Cookie cookie);  }