refactored test cases for insert