Browse souce code repository at: https://github.com/jjYBdx4IL/java-evaluation/blob/master/src/test/java/org/junit/ArrayComparisonTest.java
package org.junit;

/*
 * #%L
 * Evaluation
 * %%
 * Copyright (C) 2014 Github jjYBdx4IL Projects
 * %%
 * #L%
 */
import java.util.Arrays;
import static org.junit.Assert.*;
import static org.hamcrest.CoreMatchers.*;

/**
 *
 * @author Github jjYBdx4IL Projects
 */
public class ArrayComparisonTest {

    @Test
    public void test() {
        byte[] a = new byte[]{0, 1, 2};
        byte[] b = new byte[]{0, 1, 2};
        byte[] c = new byte[]{0, 1, 1};

        assertArrayEquals(a, b);
        try {
            assertArrayEquals(a, c);
            fail();
        } catch (AssertionError ex) {
        }

        assertTrue(Arrays.equals(a, b));
        assertFalse(Arrays.equals(a, c));

        assertThat(a, is(b));
        try {
            assertThat(a, is(c));
            fail();
        } catch (AssertionError ex) {
        }
    }

}
-------------------------------------------------------------------------------
Test set: org.junit.ArrayComparisonTest
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 s - in org.junit.ArrayComparisonTest
test  Time elapsed: 0 s