Implemented insertItem and added a test for it