Test of the primary key added.
equals method in Resource corrected. Two resources are equals if they have the same URI, even if they don't have the same type.