Many-to-many, one-to-many test code