public void commit() throws IOException {
        if (completed)   return;
        completed = true;

        // move this object out of the scope first before save, or otherwise the save() method will do nothing.
        pop();
        saveable.save();
    }
@Test
    public void nestedBulkChange() throws Exception {
        Point pt = new Point();
        Point pt2 = new Point();
        BulkChange bc1 = new BulkChange(pt);
        try {
            BulkChange bc2 = new BulkChange(pt2);
            try {
                BulkChange bc3 = new BulkChange(pt);
                try {
                    pt.set(0, 0);
                } finally {
                    bc3.commit();
                }
            } finally {
                bc2.commit();
            }
            pt.set(0, 0);
        } finally {
            bc1.commit();
        }
        assertEquals(1, pt.saveCount);
    }