public Tests(int bufferSize, int depth, String input)
throws IOException {
this.depth = depth;
byte[] in = input.getBytes("UTF-8");
JsonFactory f = new JsonFactory();
JsonParser p = f.createJsonParser(
new ByteArrayInputStream(input.getBytes("UTF-8")));
ByteArrayOutputStream os = new ByteArrayOutputStream();
Encoder cos = new BlockingBinaryEncoder(os, bufferSize);
serialize(cos, p, os);
cos.flush();
byte[] bb = os.toByteArray();
// dump(bb);
this.input = DecoderFactory.defaultFactory().createBinaryDecoder(bb, null);
this.parser = f.createJsonParser(new ByteArrayInputStream(in));
}