created tests to response with 404 and 500 status code