Added HasOne unit tests