### Question:
ValueExtractors { public static ValueExtractor fromHttpHeader(final String headerName) { return new HeaderValueExtractor(headerName); } private  ValueExtractors(); static ValueExtractor createValueExtractor(final ExtractorSource source,
                                                      final String sourceKey); static ValueExtractor fromQueryParameter(final String parameter); static ValueExtractor fromHttpHeader(final String headerName); static ValueExtractor chain(final List<ValueExtractor> extractors); static ValueExtractor chain(final ValueExtractor... extractors);  }### Answer:
@Test public void testHeaderExtractor() throws Exception { final MockHttpServletRequest request = new MockHttpServletRequest(); final ValueExtractor userAgentExtractor = ValueExtractors.fromHttpHeader("User-Agent"); Assert.assertNull("Request missing header value should return null", userAgentExtractor.extract(request)); request.addHeader("User-Agent", "Chrome"); Assert.assertEquals("Chrome", userAgentExtractor.extract(request)); }