Add unit tests for response handling.