Mocking WorkflowQueue Capacity for Testing

Hello,
I’m working on testing a workflow that uses WorkflowQueue with a capacity limit, and I’m looking for guidance on how to properly mock this in my tests.
So in my workflow, I’m creating a queue with:

    private final WorkflowQueue<QueueType> myQueue= Workflow.newWorkflowQueue(1000);

And this queue is being populated through an update method that receives user requests. When the queue reaches capacity, I’m throwing an ApplicationFailure to notify the user and I want to test this behavior.
So what I need is the capability to mock the queue’s capacity to simulate a full queue scenario in my tests. However, I haven’t been able to find appropriate methods in the workflow interceptor classes that would allow mocking Workflow.newWorkflowQueue() or control the returned queue’s behavior.

Questions

  1. Is there a recommended way to mock the created WorkflowQueue?
  2. Are there any examples for testing such scenarios because I couldn’t find any?

Thank you!

Why do you need to mock the queue? I would send more than 1k updates in the unit test to exceed the real production limit.