Check that headers are provided before trying to read them
Refactoring: use data structures for headers, use assertThat