@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() == KerberosDescriptor.class) { KerberosDescriptor descriptor = (KerberosDescriptor) object; return super.equals(object) && ( (getProperties() == null) ? (descriptor.getProperties() == null) : getProperties().equals(descriptor.getProperties()) ) && ( (getServices() == null) ? (descriptor.getServices() == null) : getServices().equals(descriptor.getServices()) ); } else { return false; } }
KerberosDescriptor extends AbstractKerberosDescriptorContainer { @Override public boolean equals(Object object) { if (object == null) { return false; } else if (object == this) { return true; } else if (object.getClass() == KerberosDescriptor.class) { KerberosDescriptor descriptor = (KerberosDescriptor) object; return super.equals(object) && ( (getProperties() == null) ? (descriptor.getProperties() == null) : getProperties().equals(descriptor.getProperties()) ) && ( (getServices() == null) ? (descriptor.getServices() == null) : getServices().equals(descriptor.getServices()) ); } else { return false; } } }
KerberosDescriptor extends AbstractKerberosDescriptorContainer { @Override public boolean equals(Object object) { if (object == null) { return false; } else if (object == this) { return true; } else if (object.getClass() == KerberosDescriptor.class) { KerberosDescriptor descriptor = (KerberosDescriptor) object; return super.equals(object) && ( (getProperties() == null) ? (descriptor.getProperties() == null) : getProperties().equals(descriptor.getProperties()) ) && ( (getServices() == null) ? (descriptor.getServices() == null) : getServices().equals(descriptor.getServices()) ); } else { return false; } } KerberosDescriptor();   KerberosDescriptor(Map<?, ?> data); }
KerberosDescriptor extends AbstractKerberosDescriptorContainer { @Override public boolean equals(Object object) { if (object == null) { return false; } else if (object == this) { return true; } else if (object.getClass() == KerberosDescriptor.class) { KerberosDescriptor descriptor = (KerberosDescriptor) object; return super.equals(object) && ( (getProperties() == null) ? (descriptor.getProperties() == null) : getProperties().equals(descriptor.getProperties()) ) && ( (getServices() == null) ? (descriptor.getServices() == null) : getServices().equals(descriptor.getServices()) ); } else { return false; } } KerberosDescriptor();   KerberosDescriptor(Map<?, ?> data); @Override Collection<? extends AbstractKerberosDescriptorContainer> getChildContainers(); @Override AbstractKerberosDescriptorContainer getChildContainer(String name); void setServices(Map<String, KerberosServiceDescriptor> services); Map<String, KerberosServiceDescriptor> getServices(); KerberosServiceDescriptor getService(String name); void putService(KerberosServiceDescriptor service); void setProperties(Map<String, String> properties); Map<String, String> getProperties(); String getProperty(String name); void putProperty(String name, String value); void update(KerberosDescriptor updates); @Override Map<String, Object> toMap(); @Override void setParent(AbstractKerberosDescriptor parent); @Override int hashCode(); @Override boolean equals(Object object); Set<String> getAllAuthToLocalProperties(); }
KerberosDescriptor extends AbstractKerberosDescriptorContainer { @Override public boolean equals(Object object) { if (object == null) { return false; } else if (object == this) { return true; } else if (object.getClass() == KerberosDescriptor.class) { KerberosDescriptor descriptor = (KerberosDescriptor) object; return super.equals(object) && ( (getProperties() == null) ? (descriptor.getProperties() == null) : getProperties().equals(descriptor.getProperties()) ) && ( (getServices() == null) ? (descriptor.getServices() == null) : getServices().equals(descriptor.getServices()) ); } else { return false; } } KerberosDescriptor();   KerberosDescriptor(Map<?, ?> data); @Override Collection<? extends AbstractKerberosDescriptorContainer> getChildContainers(); @Override AbstractKerberosDescriptorContainer getChildContainer(String name); void setServices(Map<String, KerberosServiceDescriptor> services); Map<String, KerberosServiceDescriptor> getServices(); KerberosServiceDescriptor getService(String name); void putService(KerberosServiceDescriptor service); void setProperties(Map<String, String> properties); Map<String, String> getProperties(); String getProperty(String name); void putProperty(String name, String value); void update(KerberosDescriptor updates); @Override Map<String, Object> toMap(); @Override void setParent(AbstractKerberosDescriptor parent); @Override int hashCode(); @Override boolean equals(Object object); Set<String> getAllAuthToLocalProperties();  }