### Question:
HAServersConfiguration extends HARenderer { @Override public boolean equals(Object other) { if (!(other instanceof HAServersConfiguration)) return false; HAServersConfiguration that = (HAServersConfiguration) other; if (this == that) return true; if (this.render().equalsIgnoreCase(that.render())) return true; return false; } HAServersConfiguration(List<HAConfigurationSection> sections); @Override String toString(); @Override int compareTo(HAConfigurationSection o); @Override boolean equals(Object other);  }### Answer:
@Test public void testEquals() { String healthCheck = "/whatsnew/healthCheck"; Integer xrePort = 81; List<HABackendServer> servers = new ArrayList<HABackendServer>(); servers.add(new HABackendServer("127.0.0.1", xrePort, true, "xre")); HABackend backend = new HABackend(xrePort, healthCheck, servers, null); List<HAACL> acls = new ArrayList<HAACL>(); acls.add(new HAACL(xrePort, "healthCheck")); List<HACondition> conditions = new ArrayList<HACondition>(); HAHealthCheckBackEnd checkBackEnd = new HAHealthCheckBackEnd(xrePort, "/healthCheck", servers); conditions.add(new HACondition(checkBackEnd.getName(), HACondition.makeIsCondition(xrePort.toString()))); HAHealthCheckFrontEnd healthCheckFrontEnd = new HAHealthCheckFrontEnd(80, acls, conditions); HAFrontEnd haFrontEnd = new HAFrontEnd(xrePort, backend); List<HAConfigurationSection> sections = new ArrayList<HAConfigurationSection>(); sections.add(healthCheckFrontEnd); sections.add(backend); sections.add(checkBackEnd); sections.add(haFrontEnd); List<HAConfigurationSection> othersections = new ArrayList<HAConfigurationSection>(); othersections.add(backend); othersections.add(checkBackEnd); HAServersConfiguration configuration = new HAServersConfiguration(sections); HAServersConfiguration other = new HAServersConfiguration(othersections); assertFalse(configuration.equals(other)); assertFalse(configuration.equals(other)); other = new HAServersConfiguration(sections); assertTrue(other.equals(configuration)); assertTrue(other.equals(configuration)); assertTrue(configuration.equals(configuration)); assertTrue(configuration.equals(configuration)); logger.debug(configuration.render()); }