I was going to refactor it to avoid duplicate, but I get fail :-(:
````java
if (headerName == null) {
	if (cannedHeaderElementExpressions.containsKey(elementName)) {
		for (int j = 0; j < cannedHeaderElementExpressions.get(elementName).length; j++) {
			headerName = cannedHeaderElementExpressions.get(elementName)[j][0];
			expression = cannedHeaderElementExpressions.get(elementName)[j][1];
			overwrite = "true";

		}
	}
}

if (headerName != null) {
	this.addHeader(element, headers, parserContext, headerName, headerElement, headerType, expression,
			overwrite);
}
````
HeaderChannelRegistryTests:
```
Expected: (an instance of java.lang.String or null)
     but: was <org.springframework.integration.core.MessagingTemplate$TemporaryReplyChannel@5d15126e>
	at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
	at org.junit.Assert.assertThat(Assert.java:865)
	at org.junit.Assert.assertThat(Assert.java:832)
	at org.springframework.integration.channel.registry.HeaderChannelRegistryTests$Foo.handleRequestMessage(HeaderChannelRegistryTests.java:149)
	at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:142)
```
Don't understand 'why?'