Server decoupling for tests