Factor CLI.start and TestRepo.inside into helper method