Testing the get method.
Refactored attributes getter and setter.

Moved the duplicated code checking relations to a single and private method.