Template<V> valueElementTemplate = msgpack.lookup(valueElementClass);
Template<Map<K, V>> tmpl = new MapTemplate(keyElementTemplate, valueElementTemplate);
BufferPacker packer = msgpack.createBufferPacker();
tmpl.write(packer, v);
byte[] bytes = packer.toByteArray();
Unpacker unpacker = msgpack.createUnpacker(new ByteArrayInputStream(bytes));
Map<K, V> ret = tmpl.read(unpacker, null);
assertEquals(v, ret);
}
}
}