Refactoring download tests