I have an Apex test that is testing if a record is in an approval process.
To test, I have to submit a record for approval - but there is no guarantee that there will be an approval process set up in the Org.
Generally, in test classes, I keep them self contained to generate their own test data, but for metadata, I would have to manually create it through the UI.
I could query existing approval processes, but I feel as though I should create a new, unique and unreachable one just for the purposes of testing - to ensure that if business requirements change then I do not have to worry about my tests.
Is it good practice to create an approval process for the purposes of testing, and by extension to create metadata in general just for testing? How do ISV packages handle this scenario?
(Hopefully, this meets the criteria of a good subjective question)