@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() == KerberosIdentityDescriptor.class) { KerberosIdentityDescriptor descriptor = (KerberosIdentityDescriptor) object; return super.equals(object) && ( (getReference() == null) ? (descriptor.getReference() == null) : getReference().equals(descriptor.getReference()) ) && ( (getPrincipalDescriptor() == null) ? (descriptor.getPrincipalDescriptor() == null) : getPrincipalDescriptor().equals(descriptor.getPrincipalDescriptor()) ) && ( (getKeytabDescriptor() == null) ? (descriptor.getKeytabDescriptor() == null) : getKeytabDescriptor().equals(descriptor.getKeytabDescriptor()) ) && ( (getPassword() == null) ? (descriptor.getPassword() == null) : getPassword().equals(descriptor.getPassword()) ) && ( (getWhen() == null) ? (descriptor.getWhen() == null) : getWhen().equals(descriptor.getWhen()) ); } else { return false; } }
KerberosIdentityDescriptor extends AbstractKerberosDescriptor { @Override public boolean equals(Object object) { if (object == null) { return false; } else if (object == this) { return true; } else if (object.getClass() == KerberosIdentityDescriptor.class) { KerberosIdentityDescriptor descriptor = (KerberosIdentityDescriptor) object; return super.equals(object) && ( (getReference() == null) ? (descriptor.getReference() == null) : getReference().equals(descriptor.getReference()) ) && ( (getPrincipalDescriptor() == null) ? (descriptor.getPrincipalDescriptor() == null) : getPrincipalDescriptor().equals(descriptor.getPrincipalDescriptor()) ) && ( (getKeytabDescriptor() == null) ? (descriptor.getKeytabDescriptor() == null) : getKeytabDescriptor().equals(descriptor.getKeytabDescriptor()) ) && ( (getPassword() == null) ? (descriptor.getPassword() == null) : getPassword().equals(descriptor.getPassword()) ) && ( (getWhen() == null) ? (descriptor.getWhen() == null) : getWhen().equals(descriptor.getWhen()) ); } else { return false; } } }
KerberosIdentityDescriptor extends AbstractKerberosDescriptor { @Override public boolean equals(Object object) { if (object == null) { return false; } else if (object == this) { return true; } else if (object.getClass() == KerberosIdentityDescriptor.class) { KerberosIdentityDescriptor descriptor = (KerberosIdentityDescriptor) object; return super.equals(object) && ( (getReference() == null) ? (descriptor.getReference() == null) : getReference().equals(descriptor.getReference()) ) && ( (getPrincipalDescriptor() == null) ? (descriptor.getPrincipalDescriptor() == null) : getPrincipalDescriptor().equals(descriptor.getPrincipalDescriptor()) ) && ( (getKeytabDescriptor() == null) ? (descriptor.getKeytabDescriptor() == null) : getKeytabDescriptor().equals(descriptor.getKeytabDescriptor()) ) && ( (getPassword() == null) ? (descriptor.getPassword() == null) : getPassword().equals(descriptor.getPassword()) ) && ( (getWhen() == null) ? (descriptor.getWhen() == null) : getWhen().equals(descriptor.getWhen()) ); } else { return false; } } KerberosIdentityDescriptor(String name, String reference, KerberosPrincipalDescriptor principal, KerberosKeytabDescriptor keytab, Predicate when);  KerberosIdentityDescriptor(Map<?, ?> data); }
KerberosIdentityDescriptor extends AbstractKerberosDescriptor { @Override public boolean equals(Object object) { if (object == null) { return false; } else if (object == this) { return true; } else if (object.getClass() == KerberosIdentityDescriptor.class) { KerberosIdentityDescriptor descriptor = (KerberosIdentityDescriptor) object; return super.equals(object) && ( (getReference() == null) ? (descriptor.getReference() == null) : getReference().equals(descriptor.getReference()) ) && ( (getPrincipalDescriptor() == null) ? (descriptor.getPrincipalDescriptor() == null) : getPrincipalDescriptor().equals(descriptor.getPrincipalDescriptor()) ) && ( (getKeytabDescriptor() == null) ? (descriptor.getKeytabDescriptor() == null) : getKeytabDescriptor().equals(descriptor.getKeytabDescriptor()) ) && ( (getPassword() == null) ? (descriptor.getPassword() == null) : getPassword().equals(descriptor.getPassword()) ) && ( (getWhen() == null) ? (descriptor.getWhen() == null) : getWhen().equals(descriptor.getWhen()) ); } else { return false; } } KerberosIdentityDescriptor(String name, String reference, KerberosPrincipalDescriptor principal, KerberosKeytabDescriptor keytab, Predicate when);  KerberosIdentityDescriptor(Map<?, ?> data); String getReference(); void setReference(String reference); KerberosPrincipalDescriptor getPrincipalDescriptor(); void setPrincipalDescriptor(KerberosPrincipalDescriptor principal); KerberosKeytabDescriptor getKeytabDescriptor(); void setKeytabDescriptor(KerberosKeytabDescriptor keytab); String getPassword(); void setPassword(String password); Predicate getWhen(); void setWhen(Predicate when); boolean shouldInclude(Map<String, Object> context); void update(KerberosIdentityDescriptor updates); @Override Map<String, Object> toMap(); @Override int hashCode(); @Override boolean equals(Object object); }
KerberosIdentityDescriptor extends AbstractKerberosDescriptor { @Override public boolean equals(Object object) { if (object == null) { return false; } else if (object == this) { return true; } else if (object.getClass() == KerberosIdentityDescriptor.class) { KerberosIdentityDescriptor descriptor = (KerberosIdentityDescriptor) object; return super.equals(object) && ( (getReference() == null) ? (descriptor.getReference() == null) : getReference().equals(descriptor.getReference()) ) && ( (getPrincipalDescriptor() == null) ? (descriptor.getPrincipalDescriptor() == null) : getPrincipalDescriptor().equals(descriptor.getPrincipalDescriptor()) ) && ( (getKeytabDescriptor() == null) ? (descriptor.getKeytabDescriptor() == null) : getKeytabDescriptor().equals(descriptor.getKeytabDescriptor()) ) && ( (getPassword() == null) ? (descriptor.getPassword() == null) : getPassword().equals(descriptor.getPassword()) ) && ( (getWhen() == null) ? (descriptor.getWhen() == null) : getWhen().equals(descriptor.getWhen()) ); } else { return false; } } KerberosIdentityDescriptor(String name, String reference, KerberosPrincipalDescriptor principal, KerberosKeytabDescriptor keytab, Predicate when);  KerberosIdentityDescriptor(Map<?, ?> data); String getReference(); void setReference(String reference); KerberosPrincipalDescriptor getPrincipalDescriptor(); void setPrincipalDescriptor(KerberosPrincipalDescriptor principal); KerberosKeytabDescriptor getKeytabDescriptor(); void setKeytabDescriptor(KerberosKeytabDescriptor keytab); String getPassword(); void setPassword(String password); Predicate getWhen(); void setWhen(Predicate when); boolean shouldInclude(Map<String, Object> context); void update(KerberosIdentityDescriptor updates); @Override Map<String, Object> toMap(); @Override int hashCode(); @Override boolean equals(Object object);  }