Test for inserting at front and back