[server][testUnifiedDataStore] Fix a bug that returns a dangling pointer.