Test sorting of adds and deletes