Unfortunately I see that the testing framework lacks the ability to query the activity instances, and I’m not sure if it’s because of design considerations, or simply nobody has implemented that yet.
I didn’t quite understand what you need, but if you need, for example, to check the amount of instances in ALL processes, including those running within “calls activitys”, you can use “processInstanceQuery().count( )”.
But if you need to filter the instance count by one or more specific processes, you can filter as follows:
I think you are correct. After checking on the cockpit there are indeed three separate process instances, and your suggestion returns the correct number.