Use headers.get instead of indexing in test cases

Stops Errors counting as Failures.