@Test public void ignoresUnknownAliasOnMissingRequestHeader() throws Exception { HttpHeader alias = Mockito.mock(HttpHeader.class); when(alias.getName()).thenReturn("test_alias"); when(header.getAliases()).thenReturn(Arrays.asList(alias)); String value = HttpHeaderUtilities.getHeaderValue(request, header, "default_value"); assertThat(value, is("default_value")); }
public static String getHeaderValue(HttpServletRequest httpRequest, HttpHeader header) { return getHeaderValue(httpRequest, header, null); }
HttpHeaderUtilities { public static String getHeaderValue(HttpServletRequest httpRequest, HttpHeader header) { return getHeaderValue(httpRequest, header, null); } }
HttpHeaderUtilities { public static String getHeaderValue(HttpServletRequest httpRequest, HttpHeader header) { return getHeaderValue(httpRequest, header, null); } private  HttpHeaderUtilities(); }
HttpHeaderUtilities { public static String getHeaderValue(HttpServletRequest httpRequest, HttpHeader header) { return getHeaderValue(httpRequest, header, null); } private  HttpHeaderUtilities(); static String getHeaderValue(HttpServletRequest httpRequest, HttpHeader header); static String getHeaderValue(HttpServletRequest httpRequest, HttpHeader header, String defaultValue); static String getHeaderValue(HttpServletResponse httpResponse, HttpHeader header); static String getHeaderValue(HttpServletResponse httpResponse, HttpHeader header, String defaultValue); }
HttpHeaderUtilities { public static String getHeaderValue(HttpServletRequest httpRequest, HttpHeader header) { return getHeaderValue(httpRequest, header, null); } private  HttpHeaderUtilities(); static String getHeaderValue(HttpServletRequest httpRequest, HttpHeader header); static String getHeaderValue(HttpServletRequest httpRequest, HttpHeader header, String defaultValue); static String getHeaderValue(HttpServletResponse httpResponse, HttpHeader header); static String getHeaderValue(HttpServletResponse httpResponse, HttpHeader header, String defaultValue);  }