).equals(d1) &amp;&amp; p.get(1).equals(c1)));</b>
<b class="pc">&nbsp;        paths.remove(paths.stream().filter(p -&gt; p.size() == 2 &amp;&amp; p.get(0).equals(d1) &amp;&amp; p.get(1).equals(c1)).findAny().get());</b>
<b class="pc">&nbsp;        Assert.assertTrue(paths.stream().anyMatch(p -&gt; p.size() == 3 &amp;&amp; p.get(0).equals(d1) &amp;&amp; p.get(1).equals(c1) &amp;&amp; p.get(2).equals(b1)));</b>
<b class="pc">&nbsp;        paths.remove(paths.stream().filter(p -&gt; p.size() == 3 &amp;&amp; p.g