@Override
public <K, V> void testMap(Map<K, V> v, Class<K> keyElementClass, Class<V> valueElementClass) throws Exception {
MessagePack msgpack = new MessagePack();
BufferPacker packer = msgpack.createBufferPacker();
if (v == null) {
packer.writeNil();
} else {
packer.writeMapBegin(v.size());
for (Map.Entry<K, V> e : ((Map<K, V>) v).entrySet()) {
packer.write(e.getKey());
packer.write(e.getValue());