Test for case when relationship is replicated before corresponding FK column