@Test public void testToMap() throws AmbariException { KerberosPrincipalDescriptor descriptor = createFromMap(); Assert.assertNotNull(descriptor); Assert.assertEquals(MAP_VALUE, descriptor.toMap()); }
@Override public Map<String, Object> toMap() { Map<String, Object> map = new TreeMap<String, Object>(); map.put("value", getValue()); map.put("type", KerberosPrincipalType.translate(getType())); map.put("configuration", getConfiguration()); map.put("local_username", getLocalUsername()); return map; }
KerberosPrincipalDescriptor extends AbstractKerberosDescriptor { @Override public Map<String, Object> toMap() { Map<String, Object> map = new TreeMap<String, Object>(); map.put("value", getValue()); map.put("type", KerberosPrincipalType.translate(getType())); map.put("configuration", getConfiguration()); map.put("local_username", getLocalUsername()); return map; } }
KerberosPrincipalDescriptor extends AbstractKerberosDescriptor { @Override public Map<String, Object> toMap() { Map<String, Object> map = new TreeMap<String, Object>(); map.put("value", getValue()); map.put("type", KerberosPrincipalType.translate(getType())); map.put("configuration", getConfiguration()); map.put("local_username", getLocalUsername()); return map; } KerberosPrincipalDescriptor(String principal, KerberosPrincipalType type, String configuration, String localUsername);  KerberosPrincipalDescriptor(Map<?, ?> data); }
KerberosPrincipalDescriptor extends AbstractKerberosDescriptor { @Override public Map<String, Object> toMap() { Map<String, Object> map = new TreeMap<String, Object>(); map.put("value", getValue()); map.put("type", KerberosPrincipalType.translate(getType())); map.put("configuration", getConfiguration()); map.put("local_username", getLocalUsername()); return map; } 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 Map<String, Object> toMap() { Map<String, Object> map = new TreeMap<String, Object>(); map.put("value", getValue()); map.put("type", KerberosPrincipalType.translate(getType())); map.put("configuration", getConfiguration()); map.put("local_username", getLocalUsername()); return map; } 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);  }