AFAIK, you cannot simulate a cancellation in Simulators. However, it's possible on a real device with a sanbox account. These steps are:
- Create a sanbox account in AppStoreConnect
- On your real device, login to this account by
Settings -> AppStore -> SANDBOX ACCOUNT
- When logged in, you're able to manage the account's subscription. i.e. purchase a transaction outside the app or cancel a subscription.

