Moving comments within the method to the method's javadoc.
Avoiding a second call to request.getHeader()
Refactoring the test to reflect the expected behaviour