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