Refactored the associate tests.