Add unittest handles when many-to-many relationship has broken