Add unit test cases for edit