@Test
  public void toBytes_returnsPrimitiveBytes() {
    int count = 100;
    Byte[][] byteArray = new Byte[5][10];
    for (int i = 0; i < byteArray.length; i++) {
      for (int j = 0; j < byteArray[i].length; j++) {
        byteArray[i][j] = (byte) --count;
      }
    }
    assertThat(count).isEqualTo(50);

    count = 100;
    byte[][] array = toBytes(byteArray);
    for (final byte[] bytes : array) {
      for (int j = 0; j < bytes.length; j++) {
        assertThat(bytes[j]).isEqualTo((byte) --count);
      }
    }
    assertThat(count).isEqualTo(50);
  }
Unit tests for {@link ArrayUtils}.

@since GemFire 7.x
geode-core/src/test/java/org/apache/geode/internal/util/ArrayUtilsTest.java