Write test for insert method