Test: use stub emit for tests of handler_search