### Question:
VertxClientHttpRequest extends AbstractClientHttpRequest { @Override protected void applyCookies() { getCookies() .values() .stream() .flatMap(Collection::stream) .map(HttpCookie::toString) .forEach(cookie -> delegate.putHeader("Cookie", cookie)); } VertxClientHttpRequest(HttpClientRequest delegate, BufferConverter bufferConverter); @Override HttpMethod getMethod(); @Override URI getURI(); @Override DataBufferFactory bufferFactory(); @Override Mono<Void> writeWith(Publisher<? extends DataBuffer> chunks); @Override Mono<Void> writeAndFlushWith(Publisher<? extends Publisher<? extends DataBuffer>> chunks); @Override Mono<Void> setComplete();  }### Answer:
@Test public void shouldApplyCookies() { HttpCookie cookie1 = new HttpCookie("key1", "value1"); HttpCookie cookie2 = new HttpCookie("key1", "value2"); HttpCookie cookie3 = new HttpCookie("key2", "value3"); request.getCookies().put("key1", Arrays.asList(cookie1, cookie2)); request.getCookies().add("key2", cookie3); request.applyCookies(); verify(mockHttpClientRequest).putHeader("Cookie", cookie1.toString()); verify(mockHttpClientRequest).putHeader("Cookie", cookie2.toString()); verify(mockHttpClientRequest).putHeader("Cookie", cookie3.toString()); }