unit test to check the many to many relationship.