Unit tests for errors related to relations