Key serialization test.