Pure functions vs mocking