Why do we need to cover POJO’s getter and setters as well as equals/hashcode methods as part of coverage? They do not contain any business logic. Should we exclude them from our sonar analysis?
Assuming we’re talking about generated code, I think most folks agree there’s no need to write tests for it. Your best options are completely excluding the POJOs from analysis or excluding them from coverage (and perhaps from duplications as well).
These are java files we are using as response to a REST service request. We populate them from our entity object received from DB.