assertEquals(new BytesRef(bytes), new BytesRef(actual));
IndexInputSlicer slicer = mmapDir.createSlicer("bytes", newIOContext(random()));
for (int sliceStart = 0; sliceStart < bytes.length; sliceStart++) {
for (int sliceLength = 0; sliceLength < bytes.length - sliceStart; sliceLength++) {
byte slice[] = new byte[sliceLength];
IndexInput input = slicer.openSlice("bytesSlice", sliceStart, slice.length);
input.readBytes(slice, 0, slice.length);
input.close();
assertEquals(new BytesRef(bytes, sliceStart, sliceLength), new BytesRef(slice));
}
}