@Test
public void testUpdate() {

  Map<String, Map<String, Object>> jsonData = new Gson().fromJson(JSON_SINGLE_VALUE,
      new TypeToken<Map<String, Map<String, Object>>>() {
      }.getType());
  KerberosConfigurationDescriptor configuration = new KerberosConfigurationDescriptor(jsonData);
  KerberosConfigurationDescriptor updatedConfiguration = new KerberosConfigurationDescriptor(MAP_SINGLE_VALUE);
  Map<String, String> properties;
  properties = configuration.getProperties();
  Assert.assertEquals("configuration-type", configuration.getType());
  Assert.assertNotNull(properties);
  Assert.assertEquals(2, properties.size());
  Assert.assertEquals("${property-value1}", properties.get("property1"));
  Assert.assertEquals("${property.value2}", properties.get("property2"));
  configuration.update(updatedConfiguration);
  properties = configuration.getProperties();
  Assert.assertEquals("configuration-type", configuration.getType());
  Assert.assertNotNull(properties);
  Assert.assertEquals(2, properties.size());
  Assert.assertEquals("black", properties.get("property1"));
  Assert.assertEquals("white", properties.get("property2"));
  updatedConfiguration.setType("updated-type");
  configuration.update(updatedConfiguration);
  Assert.assertEquals("updated-type", configuration.getType());
  Assert.assertNotNull(properties);
  Assert.assertEquals(2, properties.size());
  Assert.assertEquals("black", properties.get("property1"));
  Assert.assertEquals("white", properties.get("property2"));
}