### Question:
ResponseCookie { private ResponseCookie(Builder builder) { if (builder.name == null || builder.name.isEmpty()) { throw new IllegalArgumentException(); } this.name = builder.name; this.value = builder.value; this.domain = builder.domain; this.maxAge = builder.maxAge; this.path = builder.path; this.httpOnly = builder.httpOnly; this.secure = builder.secure; this.sameSite = builder.sameSite; this.hashCode = hash(name, value, domain, maxAge, path, secure, httpOnly, sameSite); } private  ResponseCookie(Builder builder); static ResponseCookie.Builder responseCookie(String name, String value); static Set<ResponseCookie> decode(List<String> headerValues); String name(); String value(); Optional<Long> maxAge(); Optional<String> path(); boolean httpOnly(); Optional<String> domain(); boolean secure(); Optional<SameSite> sameSite(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }### Answer:
@Test public void acceptsOnlyNonEmptyName() { assertThrows(IllegalArgumentException.class, () -> responseCookie("", "value").build()); }
@Test public void acceptsOnlyNonNullName() { assertThrows(NullPointerException.class, () -> responseCookie(null, "value").build()); }
@Test public void acceptsOnlyNonNullValue() { assertThrows(NullPointerException.class, () -> responseCookie("name", null).build()); }