KerberosKeytabDescriptor extends AbstractKerberosDescriptor { public void update(KerberosKeytabDescriptor updates) { if (updates != null) { String updatedValue; updatedValue = updates.getFile(); if (updatedValue != null) { setFile(updatedValue); } updatedValue = updates.getConfiguration(); if (updatedValue != null) { setConfiguration(updatedValue); } updatedValue = updates.getOwnerName(); if (updatedValue != null) { setOwnerName(updatedValue); } updatedValue = updates.getOwnerAccess(); if (updatedValue != null) { setOwnerAccess(updatedValue); } updatedValue = updates.getGroupName(); if (updatedValue != null) { setGroupName(updatedValue); } updatedValue = updates.getGroupAccess(); if (updatedValue != null) { setGroupAccess(updatedValue); } } } 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 testUpdate() { KerberosKeytabDescriptor keytabDescriptor = createFromJSON(); KerberosKeytabDescriptor updatedKeytabDescriptor = createFromMap(); Assert.assertNotNull(keytabDescriptor); Assert.assertNotNull(updatedKeytabDescriptor); keytabDescriptor.update(updatedKeytabDescriptor); validateUpdatedData(keytabDescriptor); }