### Question:
ArrayUtils { public static byte[] concat(final byte[]... arrays) { int totalSize = 0; for (final byte[] array : arrays) { totalSize += array.length; } int startIndex = 0; final byte[] result = new byte[totalSize]; for (final byte[] array : arrays) { System.arraycopy(array, 0, result, startIndex, array.length); startIndex += array.length; } return result; } private  ArrayUtils(); static byte[] duplicate(final byte[] src); static byte[] concat(final byte[]... arrays); static byte[][] split(final byte[] bytes, final int splitIndex); static byte[] toByteArray(final BigInteger value, final int numBytes); static BigInteger toBigInteger(final byte[] bytes); static int isEqualConstantTime(final byte[] b, final byte[] c); static int compare(final byte[] b, final byte[] c); static int getBit(final byte[] h, final int i);  }### Answer:
@Test public void concatCanCombineEmptyArrayWithEmptyArray() { final byte[] lhs = new byte[] {}; final byte[] rhs = new byte[] {}; final byte[] result = ArrayUtils.concat(lhs, rhs); MatcherAssert.assertThat(result, IsEqual.equalTo(new byte[] {})); }
@Test public void concatCanCombineEmptyArrayWithNonEmptyArray() { final byte[] lhs = new byte[] {}; final byte[] rhs = new byte[] {12, 4, 6}; final byte[] result = ArrayUtils.concat(lhs, rhs); MatcherAssert.assertThat(result, IsEqual.equalTo(new byte[] {12, 4, 6})); }
@Test public void concatCanCombineNonEmptyArrayWithEmptyArray() { final byte[] lhs = new byte[] {7, 13}; final byte[] rhs = new byte[] {}; final byte[] result = ArrayUtils.concat(lhs, rhs); MatcherAssert.assertThat(result, IsEqual.equalTo(new byte[] {7, 13})); }
@Test public void concatCanCombineNonEmptyArrayWithNonEmptyArray() { final byte[] lhs = new byte[] {7, 13}; final byte[] rhs = new byte[] {12, 4, 6}; final byte[] result = ArrayUtils.concat(lhs, rhs); MatcherAssert.assertThat(result, IsEqual.equalTo(new byte[] {7, 13, 12, 4, 6})); }
@Test public void concatCanCombineMoreThanTwoArrays() { final byte[] result = ArrayUtils.concat(new byte[] {7, 13}, new byte[] {12, 4, 6}, new byte[] {11, 9}); MatcherAssert.assertThat(result, IsEqual.equalTo(new byte[] {7, 13, 12, 4, 6, 11, 9})); }