title: JUnit with an expected boolean array not working
body: <p>I wrote a method where I have to input two int arrays and one int value. The method goes thru both arrays and divides each index by the int value. It stores true and false values in a third (new) boolean Array if both first indexes are dvididable by the value.</p>
  
  <pre><code>public class PIArrays {
  
      public boolean[] pairwiseContainsDividableBy(final int[] a, final int[] b, 
      final int divisor) {
  
      boolean[] result = new boolean [a.length];
  
      for(int i = 0; i &lt; a.length; i++){
              if(a[i]%divisor == 0 &amp;&amp; b[i]%divisor == 0){
                  result[i] = true;
              }else{
                  result[i] = false;
              }
          }
     return result; }
  }
  </code></pre>
  
  <p>If a = {4,8,12}, b = {24,19,18} and divisor = 4 the result becomes {true, false, false}. This all works fine. Again I have a problem with my testing method:</p>
  
  <pre><code>public class PIArraysTest {
  
  @Test
  public void testPairwiseContainsDividableBy()
  {
      PIArrays pIArrays1 = new PIArrays();
      assertEquals(new boolean[] {true,false,false}, 
         pIArrays1.pairwiseContainsDividableBy(new int[] {4,8,12},new int[] 
         {24,19,18}, 4));
  
  
     }
  }
  </code></pre>
  
  <p>Compiling works just fine again. However, if run the test I get this error:  </p>
  
  <pre><code>expected:&lt;[Z@1bf585b&gt; but was:&lt;[Z@f2c2ba&gt;
  ---
  java.lang.AssertionError: expected:&lt;[Z@1bf585b&gt; but was:&lt;[Z@f2c2ba&gt;
  at org.junit.Assert.fail(Assert.java:88)
  at org.junit.Assert.failNotEquals(Assert.java:743)
  at org.junit.Assert.assertEquals(Assert.java:118)
  at org.junit.Assert.assertEquals(Assert.java:144)
  at PIArraysTest.testPairwiseContainsDividableBy(PIArraysTest.java:76)
  </code></pre>
  
  <p>It redirects me to this line as the source of the error: </p>
  
  <pre><code>assertEquals(new boolean[] {true,false,false}, 
      pIArrays1.pairwiseContainsDividableBy(new int[] {4,8,12},new int[] 
      {24,19,18}, 4));
  </code></pre>
  
  <p>EDIT: </p>
  
  <p>So i tried a little bit and came up with this:</p>
  
  <pre><code>@Test
  public void testPairwiseContainsDividableBy()
  {
     PIArrays pIArrays1 = new PIArrays();
     boolean[] test1 = pIArrays1.pairwiseContainsDividableBy(new int[]{4,8,12},new int[] {24,19,18}, 4);
     boolean[] result = {true, false, false};
     assertArrayEquals(result, test1);
  </code></pre>
  
  <p>}</p>
  
  <p>This result in a compiler error: not suitable for a assertArrayEquals method</p>