KerberosKeytabDescriptor extends AbstractKerberosDescriptor { @Override public boolean equals(Object object) { if (object == null) { return false; } else if (object == this) { return true; } else if (object.getClass() == KerberosKeytabDescriptor.class) { KerberosKeytabDescriptor descriptor = (KerberosKeytabDescriptor) object; return super.equals(object) && ( (getConfiguration() == null) ? (descriptor.getConfiguration() == null) : getConfiguration().equals(descriptor.getConfiguration()) ) && ( (getOwnerName() == null) ? (descriptor.getOwnerName() == null) : getOwnerName().equals(descriptor.getOwnerName()) ) && ( (getOwnerAccess() == null) ? (descriptor.getOwnerAccess() == null) : getOwnerAccess().equals(descriptor.getOwnerAccess()) ) && ( (getGroupName() == null) ? (descriptor.getGroupName() == null) : getGroupName().equals(descriptor.getGroupName()) ) && ( (getGroupAccess() == null) ? (descriptor.getGroupAccess() == null) : getGroupAccess().equals(descriptor.getGroupAccess()) ); } else { return false; } } KerberosKeytabDescriptor(String file, String ownerName, String ownerAccess, String groupName,
                                  String groupAccess, String configuration, boolean cachable);  KerberosKeytabDescriptor(Map<?, ?> data); String getFile(); void setFile(String file); String getOwnerName(); void setOwnerName(String name); String getOwnerAccess(); void setOwnerAccess(String access); String getGroupName(); void setGroupName(String name); String getGroupAccess(); void setGroupAccess(String access); String getConfiguration(); void setConfiguration(String configuration); boolean isCachable(); void setCachable(boolean cachable); void update(KerberosKeytabDescriptor updates); @Override Map<String, Object> toMap(); @Override int hashCode(); @Override boolean equals(Object object);  }
@Test public void testEquals() throws AmbariException { Assert.assertTrue(createFromJSON().equals(createFromJSON())); Assert.assertFalse(createFromJSON().equals(createFromMap())); }