pletion-block-based-approach' class='heading'><a name="example5.3"></a> Using completion block based approach</h3>

<p>In these cases, we usually need to execute completion block specified as method attribute. For that, we can use <code>Perform</code>, to specify closure, that will execute upon method invocation.</p>

<p>Sample test:</p>
<pre class="highlight swift"><code><span class="k">let</span> <span class="nv">mock</span> <span class="o">=</span> <span class="kt">ProtocolWithClosuresMock</span><span cl