### Question:
HTTPRequest { public void accept(ContentType contentType) { headers.put(HTTPHeaders.ACCEPT, contentType.toString()); } HTTPRequest(HTTPMethod method, String uri); void accept(ContentType contentType); void basicAuth(String user, String password); void bearerAuth(String token); void body(byte[] body, ContentType contentType); void body(String body, ContentType contentType); void form(Map<String, String> form); String requestURI(); final HTTPMethod method; final Map<String, String> params; final Map<String, String> headers; public String uri; public byte[] body; public ContentType contentType; public Map<String, String> form; public Duration connectTimeout; public Duration timeout; public Duration slowOperationThreshold; }### Answer:
@Test void accept() { var request = new HTTPRequest(HTTPMethod.PATCH, "http: request.accept(ContentType.APPLICATION_JSON); assertThat(request.headers.get(HTTPHeaders.ACCEPT)).isEqualTo(ContentType.APPLICATION_JSON.toString()); }