Refactored test to look cleaner