Headers { public void add(String name, String value) { add(name, () -> value); } Headers();  Headers(Collection<Entry> entries); void add(String name, String value); void add(String name, Supplier<String> value); void replace(String name, String value); int size(); List<String> get(String name); void putAll(Headers header); boolean containsKey(String name); void clear(); String getFirst(String key); List<Header> all(); @Override String toString(); void cookie(Cookie cookie); void cookie(Collection<Cookie> cookies); @Override boolean equals(Object o); @Override int hashCode();  }
@Test void headersAreEqualIfEntryListIsEqual() { Headers h = new Headers(); h.add("Accepts", "application/json"); Headers j = new Headers(); j.add("Accepts", "application/json"); assertEquals(h, j); }
@Test void headersAreEqualIfEntryListIsEqual_orderMatters() { Headers h = new Headers(); h.add("Accepts", "application/json"); h.add("Content-Type", "application/xml"); Headers j = new Headers(); j.add("Content-Type", "application/xml"); j.add("Accepts", "application/json"); assertNotEquals(h, j); }