Sonar grooming: equals should be overridden along with compareTo