Add a unittest test case to check the HasOne relation