Testing for State upgrades in Framework

I am currently migrating an existing resource to the Plugin Framework. As part of that I need to migrate StateUpgraders implemented in the SDKv2 based schema as well.

Could you provide some guidance as to how to test this functionality in the Framework? Is it possible to write automated tests to accomplish this?
If so, could you please share an example as this isn’t covered in the migration guide.