DesiredConfig { @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; DesiredConfig that = (DesiredConfig) o; return new EqualsBuilder() .append(tag, that.tag) .append(serviceName, that.serviceName) .append(version, that.version) .append(hostOverrides, that.hostOverrides) .isEquals(); }  void setTag(String tag); @JsonProperty("tag") String getTag(); @JsonSerialize(include = Inclusion.NON_NULL) @JsonProperty("service_name") String getServiceName(); void setServiceName(String name); void setHostOverrides(List<HostOverride> overrides); @JsonSerialize(include = Inclusion.NON_EMPTY) @JsonProperty("host_overrides") List<HostOverride> getHostOverrides(); @JsonProperty("version") Long getVersion(); void setVersion(Long version); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode();  }
@Test public void testEquals() throws Exception { EqualsVerifier.forClass(DesiredConfig.class) .usingGetClass() .suppress(Warning.NONFINAL_FIELDS) .verify(); }