title: Unmodifiable collection equality in Java
body: <p>Why does the following test fail in Java?</p>
  
  <pre><code>@Test
  public void testUnmodifiableCollection() {
      Collection&lt;String&gt; strList = new ArrayList&lt;String&gt;();
      strList.add("foo1");
      strList.add("foo2");
      Collection&lt;String&gt; col1 = Collections.unmodifiableCollection(strList);
      Collection&lt;String&gt; col2 = Collections.unmodifiableCollection(strList);
      Assert.assertTrue(col1.equals(col2));
  }
  </code></pre>