FastBlobSchema mapSchema = mapSerializer.getFastBlobSchema();
FastBlobSerializationRecord rec = new FastBlobSerializationRecord(mapSchema);
rec.setImageMembershipsFlags(FastBlobImageUtils.ONE_TRUE);
Map<TypeA, TypeA> map = new HashMap<TypeA, TypeA>();
map.put(new TypeA(1, 1), new TypeA(4, 4));
map.put(new TypeA(3, 3), new TypeA(1, 1));
map.put(null, new TypeA(1, 1));
map.put(new TypeA(4, 4), null);
mapSerializer.serialize(map, rec);
FastBlobDeserializationRecord deserializationRec = createDeserializationRecord(mapSchema, rec);
FastBlobDeserializationRecord remappedRec = remapOrdinals(mapSchema, deserializationRec);
Map<TypeA, TypeA> typeAs = mapSerializer.deserialize(remappedRec);
Assert.assertEquals(4, typeAs.size());
Assert.assertEquals(new TypeA(0, 0), typeAs.get(new TypeA(3, 3)));
Assert.assertEquals(new TypeA(3, 3), typeAs.get(new TypeA(1, 1)));
Assert.assertEquals(new TypeA(3, 3), typeAs.get(null));
Assert.assertEquals(null, typeAs.get(new TypeA(0, 0)));
}