Fix failing test

The headers are stored in a HashMap internally, so the order of the parameters in undefined.
This was not considered in the test. This fix sorts the header lines prior to comparison.