@Test public void testEquals() throws AmbariException { Assert.assertTrue(createFromJSON().equals(createFromJSON())); Assert.assertFalse(createFromJSON().equals(createFromMap())); }
@Override public boolean equals(Object object) { if (object == null) { return false; } else if (object == this) { return true; } else if (object.getClass() == KerberosServiceDescriptor.class) { KerberosServiceDescriptor descriptor = (KerberosServiceDescriptor) object; return super.equals(object) && ( (getComponents() == null) ? (descriptor.getComponents() == null) : getComponents().equals(descriptor.getComponents()) ); } else { return false; } }
KerberosServiceDescriptor extends AbstractKerberosDescriptorContainer { @Override public boolean equals(Object object) { if (object == null) { return false; } else if (object == this) { return true; } else if (object.getClass() == KerberosServiceDescriptor.class) { KerberosServiceDescriptor descriptor = (KerberosServiceDescriptor) object; return super.equals(object) && ( (getComponents() == null) ? (descriptor.getComponents() == null) : getComponents().equals(descriptor.getComponents()) ); } else { return false; } } }
KerberosServiceDescriptor extends AbstractKerberosDescriptorContainer { @Override public boolean equals(Object object) { if (object == null) { return false; } else if (object == this) { return true; } else if (object.getClass() == KerberosServiceDescriptor.class) { KerberosServiceDescriptor descriptor = (KerberosServiceDescriptor) object; return super.equals(object) && ( (getComponents() == null) ? (descriptor.getComponents() == null) : getComponents().equals(descriptor.getComponents()) ); } else { return false; } } KerberosServiceDescriptor(Map<?, ?> data);   KerberosServiceDescriptor(String name, Map<?, ?> data); }
KerberosServiceDescriptor extends AbstractKerberosDescriptorContainer { @Override public boolean equals(Object object) { if (object == null) { return false; } else if (object == this) { return true; } else if (object.getClass() == KerberosServiceDescriptor.class) { KerberosServiceDescriptor descriptor = (KerberosServiceDescriptor) object; return super.equals(object) && ( (getComponents() == null) ? (descriptor.getComponents() == null) : getComponents().equals(descriptor.getComponents()) ); } else { return false; } } 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); @Override Map<String, Object> toMap(); @Override int hashCode(); @Override boolean equals(Object object); }
KerberosServiceDescriptor extends AbstractKerberosDescriptorContainer { @Override public boolean equals(Object object) { if (object == null) { return false; } else if (object == this) { return true; } else if (object.getClass() == KerberosServiceDescriptor.class) { KerberosServiceDescriptor descriptor = (KerberosServiceDescriptor) object; return super.equals(object) && ( (getComponents() == null) ? (descriptor.getComponents() == null) : getComponents().equals(descriptor.getComponents()) ); } else { return false; } } 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); @Override Map<String, Object> toMap(); @Override int hashCode(); @Override boolean equals(Object object);  }