assertInserted(res);
}
@Test
public void testSetUnset() throws Exception {
Key<Circle> key = ds.save(new Circle(1));
UpdateResults<Circle> res = ds.updateFirst(
ds.find(Circle.class, "radius", 1D),
ds.createUpdateOperations(Circle.class).set("radius",2D));
assertUpdated(res, 1);
Circle c = ds.getByKey(Circle.class, key);
assertEquals(2D, c.getRadius(), 0);
res = ds.updateFirst(
ds.find(Circle.class, "radius", 2D),
ds.createUpdateOperations(Circle.class).unset("radius"));
assertUpdated(res, 1);
Circle c2 = ds.getByKey(Circle.class, key);
assertEquals(0D, c2.getRadius(), 0);
}