  ut.GetDescriptor()->file()->CopyTo(&file_desc_proto);
  std::string file_desc_str;
  file_desc_proto.SerializeToString(&file_desc_str);
  EXPECT_TRUE(factory->RegisterPythonMessage(file_desc_str));

  proto_desc.set_desc(file_desc_str);
  std::string proto_desc_str;
  proto_desc.SerializeToString(&proto_desc_str);
  EXPECT_TRUE(factory->RegisterMessage(proto_desc_str));

  EXPECT_TRUE(factory->RegisterMessage(file_desc_proto));
  EXPECT_TRUE(factory->RegisterMessage(*(ut.GetDescriptor())));
  EXPECT_TRUE(factory->RegisterMessage(ut));