[testbox-2.0] mocking prc with RequestContextDecorator

So I currently have this code:

MockContext = getController().getRequestService().getContext();
MockRequestService = getMockBox().createEmptyMock(“coldbox.system.web.services.RequestService”).$(“getContext”,MockContext);

var prc = MockContext.getCollection(private=true);

And it seemed to work initially, but it seems our custom RequestContext (which extends coldbox.system.web.context.RequestContextDecorator) is not seeing the same prc as the tests.

I’ve tried this but it doesn’t appear to work:

MockRequestContext = getMockBox().prepareMock( createObject(“component”,“path.to.CustomRequestContext”) );
var prc = MockContext.getCollection(private=true);
MockRequestContext.$property(propertyName=“instance.privateContext”,mock=prc);

Is that the right approach, or does something else need doing?

Nevermind, it seems I didn’t need all those mock-related lines - just a single line to get the PRC solves the issues:

variables.prc = getController().getRequestService().getContext().getCollection(private=true)