Let’s build. Photo by Todd Quackenbush on Unsplash

When I was reading the When to Mock article for the first time I had mixed feelings. First I was nodding: well, this is obvious. No mocks — bad. Too many mocks — bad. Mock across your architectural boundaries — good. That’s an easy “check” for any of our services. The part of “Write your own mocks”, that’s where I got confused. Why would anyone want to write another Mockito or Spock? None of the arguments seemed right to me.

It turned out I might’ve not fully understood what it means to write your own mock. The remarkable bit here…

Oleksii Lomako

Software Engineer @ TransferWise

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store