DataOutput output = new DataOutputImpl();
MetadataSerDeser.write(metadata, output);
byte[] metadataBytes = output.toByteArray();
Metadata readMetadata = MetadataSerDeser.read(new DataInputImpl(metadataBytes));
assertEquals("value", readMetadata.get("string"));
assertEquals(5, (int)readMetadata.getInt("int", null));
assertEquals(99999999999L, (long)readMetadata.getLong("long", null));
assertEquals(3.33f, readMetadata.getFloat("float", null), 0.001f);
assertEquals(6.66d, (double)readMetadata.getDouble("double", null), 0.001d);