Add test case for BadRequestError.