Introduction
Mock objects help us test parts of our app by pretending to be real parts. Protocols define rules that these parts must follow.
When you want to test a screen without using real data from the internet.
When you want to check if a button calls the right function.
When you want to replace a slow or complex part with a simple fake one during testing.