### Question:
HeaderHelpers { public static MultiMap createHeaders(final MultiMap headers) { final MultiMap headersToReturn = new VertxHttpHeaders(); headers.forEach(entry -> headersToReturn.add(entry.getKey(), entry.getValue())); headersToReturn.remove(HttpHeaders.CONTENT_LENGTH); headersToReturn.remove(HttpHeaders.ORIGIN); renameHeader(headersToReturn, HttpHeaders.HOST, HttpHeaders.X_FORWARDED_HOST); return headersToReturn; }  static MultiMap createHeaders(final MultiMap headers);  }### Answer:
@Test void hostHeaderIsRenamedToXForwardedHost() { final MultiMap input = new VertxHttpHeaders(); input.add(HttpHeaders.HOST, "arbitrary"); final MultiMap output = HeaderHelpers.createHeaders(input); assertThat(output.get(HttpHeaders.HOST)).isNull(); assertThat(output.get(HttpHeaders.X_FORWARDED_HOST)).isEqualTo("arbitrary"); }
@Test void ensureMultiEntryHeadersAreCopiedCorrectly() { final MultiMap input = new VertxHttpHeaders(); final List<String> headerValues = Lists.newArrayList("arbitrary", "secondArbitrary"); input.add(HttpHeaders.HOST, headerValues); final MultiMap output = HeaderHelpers.createHeaders(input); assertThat(output.getAll(HttpHeaders.X_FORWARDED_HOST)) .containsExactlyInAnyOrder("arbitrary", "secondArbitrary"); }