update tests to use injection