Refactored attribute tester