### Question:
KerberosServiceDescriptor extends AbstractKerberosDescriptorContainer { @Override public boolean equals(Object object) { if (object == this) { return true; } if (!(object instanceof KerberosServiceDescriptor)) { return false; } KerberosServiceDescriptor that = (KerberosServiceDescriptor) object; return new EqualsBuilder() .appendSuper(super.equals(object)) .append(components, components) .append(preconfigure, that.preconfigure) .isEquals(); } KerberosServiceDescriptor(Map<?, ?> data);   KerberosServiceDescriptor(String name, Map<?, ?> data); @Override Collection<? extends AbstractKerberosDescriptorContainer> getChildContainers(); @Override AbstractKerberosDescriptorContainer getChildContainer(String name); Map<String, KerberosComponentDescriptor> getComponents(); KerberosComponentDescriptor getComponent(String name); void putComponent(KerberosComponentDescriptor component); void update(KerberosServiceDescriptor updates); boolean shouldPreconfigure(); void setPreconfigure(Boolean preconfigure); @Override Map<String, Object> toMap(); List<KerberosIdentityDescriptor> getComponentIdentities(String componentName); @Override int hashCode(); @Override boolean equals(Object object);  }### Answer:
@Test public void testEquals() throws AmbariException { Assert.assertTrue(createFromJSON().equals(createFromJSON())); Assert.assertFalse(createFromJSON().equals(createFromMap())); }