title: How to compare two Linked Lists correctly in JUnit?
body: <p>I have the following sentence:</p>
  <pre><code>assertArrayEquals(Arrays.asList(df.sort(&quot;State&quot;, new SortDescending())).toArray(),Arrays.asList(&quot;[WV, WV, WI, WA, VA, TX, SD, PA, OH, ND, NC, NC, MB, MA, KS, FL, DE]&quot;).toArray());
  </code></pre>
  <p>The return of the function is a List&lt; Object &gt; and it contains:</p>
  <pre><code>[WV, WV, WI, WA, VA, TX, SD, PA, OH, ND, NC, NC, MB, MA, KS, FL, DE]
  </code></pre>
  <p>The error is:</p>
  <pre><code>Expected :java.util.LinkedList&lt;[WV, WV, WI, WA, VA, TX, SD, PA, OH, ND, NC, NC, MB, MA, KS, FL, DE]&gt;
  Actual   :java.lang.String&lt;[WV, WV, WI, WA, VA, TX, SD, PA, OH, ND, NC, NC, MB, MA, KS, FL, DE]&gt;
  </code></pre>
  <p>Why i don't pass the test when I compare these two lists?</p>