@Test
  public void testDiskRegionByteArray() {
    DiskRegionProperties diskRegionProperties = new DiskRegionProperties();
    diskRegionProperties.setPersistBackup(true);
    diskRegionProperties.setDiskDirs(diskDirs);

    DiskStoreFactory diskStoreFactory = toDiskStoreFactory(diskRegionProperties);

    createDiskStoreWithSizeInBytes(diskStoreName, diskStoreFactory);

    Region<Object, Object> region =
        createRegion(regionName, diskStoreName, true, true, false, false, 0);

    int ENTRY_SIZE = 1024;
    int OP_COUNT = 10;
    String key = "K";
    byte[] value = new byte[ENTRY_SIZE];
    Arrays.fill(value, (byte) 77);

    // put an entry
    region.put(key, value);

    // put few more entries to write on disk
    for (int i = 0; i < OP_COUNT; i++) {
      region.put(i, value);
    }

    // get from disk
    DiskId diskId = ((DiskEntry) ((InternalRegion) region).basicGetEntry("K")).getDiskId();
    Object val = getDiskRegion(region).get(diskId);

    // verify that the value retrieved above represents byte array.
    // verify the length of the byte[]
    assertThat((byte[]) val).hasSize(1024);

    // verify that the retrieved byte[] equals to the value put initially.
    byte[] x = (byte[]) val;
    boolean result = false;
    for (int i = 0; i < x.length; i++) {
      result = x[i] == value[i];
    }

    assertThat(result).as("The val obtained from disk is not euqal to the value put initially")
        .isTrue();
  }
DiskRegionByteArrayJUnitTest: A byte array as a value put in local persistent region ,when
retrieved from the disk should be correctly presented as a byte array
geode-core/src/integrationTest/java/org/apache/geode/internal/cache/DiskRegionJUnitTest.java