For local testing I often run pathod (<a href="http:&#x2F;&#x2F;pathod.net&#x2F;" rel="nofollow">http:&#x2F;&#x2F;pathod.net&#x2F;</a>), which can not only yield arbitrary response codes based on the request URL, but randomly generated headers and body and even timeouts.