### Question:
RequestCookie { private RequestCookie(String name, String value) { if (name == null || name.isEmpty()) { throw new IllegalArgumentException("name cannot be null or empty"); } requireNonNull(value, "value cannot be null"); this.name = name; this.value = value; this.hashCode = Objects.hash(name, value); } private  RequestCookie(String name, String value); static RequestCookie requestCookie(String name, String value); static Set<RequestCookie> decode(String headerValue); static String encode(Collection<RequestCookie> cookies); String name(); String value(); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }### Answer:
@Test public void acceptsOnlyNonEmptyName() { assertThrows(IllegalArgumentException.class, () -> requestCookie("", "value")); }
@Test public void acceptsOnlyNonNullName() { assertThrows(IllegalArgumentException.class, () -> requestCookie(null, "value")); }
@Test public void acceptsOnlyNonNullValue() { assertThrows(NullPointerException.class, () -> requestCookie("name", null)); }