associations_test refactored