Refactor request tests