Unit test for edit controller