Test inserting documents