Refactor setup of test services, to avoid double-initialization