ByteArrayOutputStream out = new ByteArrayOutputStream();
Packer packer = msgpack.createPacker(out);
packer.writeShort(v);
ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray());
Unpacker unpacker = msgpack.createUnpacker(in);
short ret = unpacker.readShort();
assertEquals(v, ret);
}
@Test @Override
public void testInteger() throws Exception {