Move away from WebApplicationException and test the actual response codes using the Response object.