 class="p">:</span> <span class="kt">T</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="kt">Bool</span>
<span class="p">}</span>
</code></pre>

<p>Sample test when using mock adopting protocol with associated types:</p>
<pre class="highlight swift"><code><span class="k">let</span> <span class="nv">mock</span> <span class="o">=</span> <span class="kt">ProtocolWithAssociatedTypeMock</span><span class="o">&lt;</span><span class="p">[</span><span class="kt">Int</span><span class="p">]</s