test for create and update