Refactor defining of test doubles into separate module