Handle headers in test