Migrate to a test site
Yes it's possible.

You may get a notice that the licence key is in use on another domain if your testing domain is publicly accessible (rather than running on your local machine). But the site will continue to work just fine.

What you can't do is run 2 "live" sites with the same key. That's a violation of the licence.

Furthermore, by going to https://id.craftcms.com/ you can manage the licences for any Craft sites you have.