I'm creating TestNG tests for Java classes that are normally used from Xpages application. Since they have to call some legacy LotusScript code, I have to use agent.runWithDocumentContext call.
From Xpages this runs fine. But when I call this method from TestNG suite run from Domino Designer, I get
NotesException: Unable to pass doc context - Caller must run with user authority
I create session normally using NotesFactory.createSession()
Database is on test server and agent has Run As Web User property set, since it is called correctly form xpages in the app.
Everything runs on 9.0.1 Domino