add test using custom operator
(cherry picked from commit ba41255fecb48614e6ef6b67843548777a8a6193)