HeaderAccessUtils { public static boolean caseInsensitiveContains(Map<String, Collection<String>> headers, String headerName) { for (String key : headers.keySet()) { if (headerName.equalsIgnoreCase(key)) { return true; } } return false; } private  HeaderAccessUtils(); static boolean caseInsensitiveContains(Map<String, Collection<String>> headers, String headerName); static Collection<String> caseInsensitiveGet(Map<String, Collection<String>> headers, String headerName);  }
@Test public void caseInsensitiveContainsShouldReturnTrueIgnoringCase() { assertThat(HeaderAccessUtils.caseInsensitiveContains(TEST_HEADERS_MAP, "hEaDeR")) .isTrue(); }
@Test public void caseInsensitiveContainsShouldReturnFalseForNonExistentKey() { assertThat(HeaderAccessUtils.caseInsensitiveContains(TEST_HEADERS_MAP, "invalid")) .isFalse(); }