Refactor TestRepo setup