Unit test requires a bad gateway error, but wants a 404 code returned. This is incorrect, bad gateway is error code 502. Also, per W3 spec, no body should be returned for a 404, either. https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html