g</span><span class="p">?)</span> <span class="o">-&gt;</span> <span class="kt">String</span><span class="p">?</span>
<span class="p">}</span>
</code></pre>

<p>Test - usage of <code>Given</code> to specify stubbed methods return values, based on passed attributes, and <code>Verify</code> to check invocations count:</p>
<pre class="highlight swift"><code><span class="k">let</span> <span class="nv">mock</span> <span class="o">=</span> <span class="kt">SimpleProtocolWithMethodsMock</span><span class="p">()</s