Refactor testing mock to helpers