private byte[] getHeader(LogSegment segment) throws IOException {
    FileChannel channel = segment.getView().getSecond();
    ByteBuffer header = ByteBuffer.allocate(LogSegment.HEADER_SIZE);
    channel.read(header, 0);
    return header.array();
  }
Tests for bad construction cases of {@link LogSegment}.
@throws IOException
ambry-store/src/test/java/com/github/ambry/store/LogSegmentTest.java