Refactor with helper for request tests