Made context an interface so it could be mocked.