Allow for mocked objects to be passed in.