Check first whether class and relationship object is present in the relationship test.