Refactored associations test