public static Map<String, String> removeHeaders(Map<String, String> headers, Collection<String> headerNames)
  {
    if (headers == null || headerNames == null  || headerNames.isEmpty())
    {
      return headers;
    }
    Set<String> headersToRemove = new TreeSet<>(String.CASE_INSENSITIVE_ORDER);
    headersToRemove.addAll(headerNames);
    Map<String, String> newHeaders = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);
    for(Map.Entry<String, String> header : headers.entrySet())
    {
      String name = header.getKey();
      if (!headersToRemove.contains(name))
      {
        newHeaders.put(name, header.getValue());
      }
    }
    return newHeaders;
  }
@Test
  public void testRemoveHeaders()
  {
    Map<String, String> headers = new HashMap<>();
    headers.put("X-header1", "header1Value");
    headers.put("X-header2", "header2Value");
    headers.put("X-header3", "header3Value");
    List<String> headersToRemove = Arrays.asList("x-header3", "x-header4");

    Map<String, String> newHeader = HeaderUtil.removeHeaders(headers, headersToRemove);

    Assert.assertEquals(newHeader.size(), 2);
    Assert.assertEquals(newHeader.get("x-header1"), "header1Value");
    Assert.assertEquals(newHeader.get("x-header2"), "header2Value");
  }