g</code>, giving great flexibility to tests. Please consider following:</p>
<pre class="highlight swift"><code><span class="c1">// inject mock to sut. Every time sut saves user data, it should trigger storage storeUser method</span>
<span class="n">sut</span><span class="o">.</span><span class="n">usersStorage</span> <span class="o">=</span> <span class="n">mockStorage</span>
<span class="n">sut</span><span class="o">.</span><span class="nf">saveUser</span><span class="p">(</span><span class="nv">name</span