api: resetHandlers only used in test code