Sample code from blog post https://unlisted.github.io/jekyll/update/2017/01/22/mocking-subprocess.html