I created an Apex CDC Trigger on the ActionCadenceTracker object via the ActionCadenceTrackerChangeEvent to update a Lead's status when the sales cadence is completed. I'd like to write Apex test code for this but can't figure out how to create the Sales Cadence records. When I try to create the ActionCadenceTracker record in Apex, I get a "DML operation INSERT not allowed on ActionCadenceTracker" error. The documentation says one has to assign a prospect to a Sales Cadence but only gives declarative options and the one Apex example given shows to call out to a Salesforce API.
The automation is similar to this Salesforce lead status sample automation but uses the ActionCadenceTracker object.
Is this possible?