Refactored Tests method