add unit test for update