private void verifyVersionInfo() throws IOException {
    var data1 = new ByteArrayOutputStream((int)myVersionInfo.sizeInBytes());
    myVersionInfo.resetOffsets(0);
    myVersionInfo.write(new DataOutputStream(data1));

    var copy = new VersionInfo();
    copy.read(new OffsetTrackingInputStream(new DataInputStream(new ByteArrayInputStream(data1.toByteArray()))));
    copy.resetOffsets(0);
    var data2 = new ByteArrayOutputStream((int)copy.sizeInBytes());
    copy.write(new DataOutputStream(data2));

    if (!Arrays.equals(data1.toByteArray(), data2.toByteArray())) {
      throw new IllegalStateException("Load and save of VersionInfo produced different binary results");
    }
  }
private void verifyVersionInfo()