Refactored test to improve readability