private void readAndEnsureMatch(LogSegment segment, long offsetToStartRead, byte[] original) throws IOException {
    ByteBuffer readBuf = ByteBuffer.wrap(new byte[original.length]);
    segment.readInto(readBuf, offsetToStartRead);
    assertArrayEquals("Data read does not match data written", original, readBuf.array());
  }
Reads data starting from {@code offsetToStartRead} of {@code segment} and matches it with {@code original}.
@param segment the {@link LogSegment} to read from.
@param offsetToStartRead the offset in {@code segment} to start reading from.
@param original the byte array to compare against.
@throws IOException
ambry-store/src/test/java/com/github/ambry/store/LogSegmentTest.java