write tests for status code processing