added tests for insert mode.