public static BytesInput fromUnsignedVarInt(int intValue) {
    return new UnsignedVarIntBytesInput(intValue);
  }
@Test
  public void testFromUnsignedVarInt() throws IOException {
    int value = RANDOM.nextInt(Short.MAX_VALUE);
    ByteArrayOutputStream baos = new ByteArrayOutputStream(2);
    BytesUtils.writeUnsignedVarInt(value, baos);
    byte[] data = baos.toByteArray();
    Supplier<BytesInput> factory = () -> BytesInput.fromUnsignedVarInt(value);

    validate(data, factory);
  }