Cookie { public static Builder builder(String name, String value) { Preconditions.checkNotNull(name); Preconditions.checkNotNull(value); return new Builder(name, value); } Cookie(String name,
                  String value,
                  String comment,
                  String domain,
                  int maxAge,
                  String path,
                  boolean secure,
                  boolean httpOnly); String getName(); String getValue(); String getComment(); String getDomain(); int getMaxAge(); String getPath(); boolean isSecure(); boolean isHttpOnly(); @Override boolean equals(Object o); @Override int hashCode(); static Builder builder(String name, String value); static Builder builder(Cookie like);  }
@Test public void testThatBuilderRejectsNullKeys() { boolean gotException = false; try { Cookie.builder(null, ""); } catch (NullPointerException nullPointerException ){ gotException = true; } assertTrue(gotException); }
@Test public void testThatBuilderRejectsNullValues() { boolean gotException = false; try { Cookie.builder("", null); } catch (NullPointerException nullPointerException ){ gotException = true; } assertTrue(gotException); }