Added test for inserting element in the middle of text