Refactor helpers test