@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() == KerberosPrincipalDescriptor.class) { KerberosPrincipalDescriptor descriptor = (KerberosPrincipalDescriptor) object; return super.equals(object) && ( (getConfiguration() == null) ? (descriptor.getConfiguration() == null) : getConfiguration().equals(descriptor.getConfiguration()) ) && ( (getType() == null) ? (descriptor.getType() == null) : getType().equals(descriptor.getType()) ); } else { return false; } }
KerberosPrincipalDescriptor extends AbstractKerberosDescriptor { @Override public boolean equals(Object object) { if (object == null) { return false; } else if (object == this) { return true; } else if (object.getClass() == KerberosPrincipalDescriptor.class) { KerberosPrincipalDescriptor descriptor = (KerberosPrincipalDescriptor) object; return super.equals(object) && ( (getConfiguration() == null) ? (descriptor.getConfiguration() == null) : getConfiguration().equals(descriptor.getConfiguration()) ) && ( (getType() == null) ? (descriptor.getType() == null) : getType().equals(descriptor.getType()) ); } else { return false; } } }
KerberosPrincipalDescriptor extends AbstractKerberosDescriptor { @Override public boolean equals(Object object) { if (object == null) { return false; } else if (object == this) { return true; } else if (object.getClass() == KerberosPrincipalDescriptor.class) { KerberosPrincipalDescriptor descriptor = (KerberosPrincipalDescriptor) object; return super.equals(object) && ( (getConfiguration() == null) ? (descriptor.getConfiguration() == null) : getConfiguration().equals(descriptor.getConfiguration()) ) && ( (getType() == null) ? (descriptor.getType() == null) : getType().equals(descriptor.getType()) ); } else { return false; } } KerberosPrincipalDescriptor(String principal, KerberosPrincipalType type, String configuration, String localUsername);  KerberosPrincipalDescriptor(Map<?, ?> data); }
KerberosPrincipalDescriptor extends AbstractKerberosDescriptor { @Override public boolean equals(Object object) { if (object == null) { return false; } else if (object == this) { return true; } else if (object.getClass() == KerberosPrincipalDescriptor.class) { KerberosPrincipalDescriptor descriptor = (KerberosPrincipalDescriptor) object; return super.equals(object) && ( (getConfiguration() == null) ? (descriptor.getConfiguration() == null) : getConfiguration().equals(descriptor.getConfiguration()) ) && ( (getType() == null) ? (descriptor.getType() == null) : getType().equals(descriptor.getType()) ); } else { return false; } } KerberosPrincipalDescriptor(String principal, KerberosPrincipalType type, String configuration, String localUsername);  KerberosPrincipalDescriptor(Map<?, ?> data); String getValue(); void setValue(String value); KerberosPrincipalType getType(); void setType(KerberosPrincipalType type); String getConfiguration(); void setConfiguration(String configuration); String getLocalUsername(); void setLocalUsername(String localUsername); void update(KerberosPrincipalDescriptor updates); @Override Map<String, Object> toMap(); @Override int hashCode(); @Override boolean equals(Object object); }
KerberosPrincipalDescriptor extends AbstractKerberosDescriptor { @Override public boolean equals(Object object) { if (object == null) { return false; } else if (object == this) { return true; } else if (object.getClass() == KerberosPrincipalDescriptor.class) { KerberosPrincipalDescriptor descriptor = (KerberosPrincipalDescriptor) object; return super.equals(object) && ( (getConfiguration() == null) ? (descriptor.getConfiguration() == null) : getConfiguration().equals(descriptor.getConfiguration()) ) && ( (getType() == null) ? (descriptor.getType() == null) : getType().equals(descriptor.getType()) ); } else { return false; } } KerberosPrincipalDescriptor(String principal, KerberosPrincipalType type, String configuration, String localUsername);  KerberosPrincipalDescriptor(Map<?, ?> data); String getValue(); void setValue(String value); KerberosPrincipalType getType(); void setType(KerberosPrincipalType type); String getConfiguration(); void setConfiguration(String configuration); String getLocalUsername(); void setLocalUsername(String localUsername); void update(KerberosPrincipalDescriptor updates); @Override Map<String, Object> toMap(); @Override int hashCode(); @Override boolean equals(Object object);  }