}
}
public void test_set_chronicle_attribute_with_value_same_as_default() {
try {
Schema schema1 = db.getSchemas("schema1a").iterator().next();
UpdatableChronicle chro = db.getTopChronicle().edit().createChronicle("schema1achro2", false, "test chronicle", null, schema1);
chro.applyUpdates();
// use the attribute
Attribute<?> a = chro.getAttribute("prop1", true);
assertEquals("t1v1", schema1.getAttributeDefinition("prop1", false).getValue().toString());
a.scan("t1v1");
chro.setAttribute(a);
chro.applyUpdates();
assertEquals("t1v1", chro.getAttribute("prop1", true).get().toString());
// now change the default
UpdatableSchema uschema1 = schema1.edit();
uschema1.setAttributeDefault(1, "t1v2");
uschema1.applyUpdates();
// expect that the attribute value has changed because t1v1 above was not set, being the default
Chronicle c = db.getChronicle("bt.schema1achro2", true);
assertEquals("t1v1", c.getAttribute("prop1", true).get().toString());