Why is assertEquals(Object[], Object[]) from JUnit 4 deprecated? : <p>Eclipse is giving me a warning that says that the method <code>assertEquals(Object[], Object[])</code> from the type <code>Assert</code> is deprecated. I am using JUnit 4.</p>

<p>I wrote the following code in Eclipse:</p>

<pre><code>import org.junit.Test;
import org.junit.Assert;

public class Generics { 
    public &lt;T&gt; T[] genericArraySwap(T[] list, int pos1, int pos2) throws IndexOutOfBoundsException {
        ...
    }

    @Test
    public void genericArraySwapTest() {
        Integer[] IntegerList = {0, 1, 2, 3, 4};        
        Assert.assertEquals(new Integer[] {0, 1, 2, 4, 3}, genericArraySwap(IntegerList, 3, 4));
    }
}
</code></pre>

<p>Can someone tell me why this method is deprecated or what method I should use instead?</p>
