public static BytesInput fromZigZagVarLong(long longValue) {
    long zigZag = (longValue << 1) ^ (longValue >> 63);
    return new UnsignedVarLongBytesInput(zigZag);
  }
@Test
  public void testFromZigZagVarLong() throws IOException {
    long value = RANDOM.nextInt();
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    BytesUtils.writeZigZagVarLong(value, baos);
    byte[] data = baos.toByteArray();
    Supplier<BytesInput> factory = () -> BytesInput.fromZigZagVarLong(value);

    validate(data, factory);
  }