Add unit tests for abstract Relationship and BelongsTo classes
Pull duplicated code up into parent class