How are you restoring to the Test site?
If you are restoring the vm snapshot that includes the Exchange database, that isnt supported.
https://learn.microsoft.com/en-us/exchange/plan-and-deploy/virtualization?view=exchserver-2019
The only supported method would be to build a new test server and forest that match the prod AD forest and restore the databases from an Exchange aware backup or copied edb database.
Example:
or run the recoverserver option assuming the test forest was a clone of the prod:
If the test environment is a server in the prod AD forest, then you could also use database portability: