HeaderExtractor implements EnumeratedValuesExtractor { @SuppressWarnings("unchecked") @Override public Enumeration<String> getValues(String key) { return request.getHeaders(key); } HeaderExtractor(HttpServletRequest request,
            HttpServletResponse response); @SuppressWarnings("unchecked") @Override Enumeration<String> getKeys(); @Override String getValue(String key); @SuppressWarnings("unchecked") @Override Enumeration<String> getValues(String key); @Override void setValue(String key, String value);  }
@SuppressWarnings("unchecked") @Test public void testGetValues() { Enumeration<String> keys = createMock(Enumeration.class); expect(request.getHeaders("name")).andReturn(keys); replay(request, response, keys); assertEquals(keys, extractor.getValues("name")); verify(request, response, keys); }