rewrite config injection in tests