await();
}
@Test
public void testHeadersCopiedAfterSend() throws Exception {
MultiMap headers = new CaseInsensitiveHeaders();
headers.add("foo", "bar");
vertx.eventBus().consumer(ADDRESS1).handler(msg -> {
assertNotSame(headers, msg.headers());
assertEquals("bar", msg.headers().get("foo"));
testComplete();
});
vertx.eventBus().send(ADDRESS1, "foo", new DeliveryOptions().setHeaders(headers));
headers.remove("foo");
await();
}