public static int fill(byte[] bytes, int index, int length, byte value)
    {
        requireNonNull(bytes, "bytes is null");
        checkValidRange(index, length, bytes.length);

        unsafe.setMemory(bytes, index + ARRAY_BYTE_BASE_OFFSET, length, value);
        return index + length;
    }
@Test
    public static void testFill()
    {
        byte[] destination = new byte[POSITIONS_PER_PAGE];
        int filledBytes = fill(destination, 0, POSITIONS_PER_PAGE, (byte) 5);

        assertEquals(filledBytes, POSITIONS_PER_PAGE);
        assertCopied(
                nCopies(POSITIONS_PER_PAGE, (byte) 5),
                destination,
                ARRAY_BYTE_INDEX_SCALE,
                MoreByteArrays::getByte);
    }