HeaderMappingKeyExtractor extends AbstractMappingKeyExtractor { public void setHeaderName(String headerName) { this.headerName = headerName; } HeaderMappingKeyExtractor();  HeaderMappingKeyExtractor(String headerName); @Override String getMappingKey(Message request); void setHeaderName(String headerName);  }
@Test public void testExtractMappingKey() throws Exception { HeaderMappingKeyExtractor extractor = new HeaderMappingKeyExtractor(); extractor.setHeaderName("Foo"); Assert.assertEquals(extractor.extractMappingKey(new DefaultMessage("Foo") .setHeader("Foo", "foo") .setHeader("Bar", "bar")), "foo"); }