Add test for passing a functor.