@Test
public void testPopulateConfigurationEntity_newSchema() throws Exception {

  Map<String, String> configuration = new HashMap<String, String>();
  configuration.put("global/properties/property1", "val1");
  configuration.put("global/properties/property2", "val2");
  configuration.put("global/properties_attributes/final/property1", "true");
  configuration.put("global/properties_attributes/final/property2", "false");
  configuration.put("global/properties_attributes/deletable/property1", "true");
  BlueprintConfiguration config = new BlueprintConfigEntity();
  provider.populateConfigurationEntity(configuration, config);
  assertNotNull(config.getConfigData());
  assertNotNull(config.getConfigAttributes());
  Map<?, ?> configData = StageUtils.getGson().fromJson(config.getConfigData(), Map.class);
  Map<?, Map<?, ?>> configAttrs = StageUtils.getGson().fromJson(config.getConfigAttributes(), Map.class);
  assertNotNull(configData);
  assertNotNull(configAttrs);
  assertEquals(2, configData.size());
  assertTrue(configData.containsKey("property1"));
  assertTrue(configData.containsKey("property2"));
  assertEquals("val1", configData.get("property1"));
  assertEquals("val2", configData.get("property2"));
  assertEquals(2, configAttrs.size());
  assertTrue(configAttrs.containsKey("final"));
  assertTrue(configAttrs.containsKey("deletable"));
  Map<?, ?> finalAttrs = configAttrs.get("final");
  assertNotNull(finalAttrs);
  assertEquals(2, finalAttrs.size());
  assertTrue(finalAttrs.containsKey("property1"));
  assertTrue(finalAttrs.containsKey("property2"));
  assertEquals("true", finalAttrs.get("property1"));
  assertEquals("false", finalAttrs.get("property2"));
  Map<?, ?> deletableAttrs = configAttrs.get("deletable");
  assertNotNull(deletableAttrs);
  assertEquals(1, deletableAttrs.size());
  assertTrue(deletableAttrs.containsKey("property1"));
  assertEquals("true", deletableAttrs.get("property1"));
}