@Override
public <K, V> void testMap(Map<K, V> v, Class<K> keyElementClass, Class<V> valueElementClass) throws Exception {
MessagePack msgpack = new MessagePack();
Template<K> keyElementTemplate = msgpack.lookup(keyElementClass);
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));