refactor tests to use helper module