InsertQuery and it's tests