Deal with custom callables in tests