test for update method