Sign in to Community
Sign in to view all badges
Below is my original class
@referenceprivate ResourceResolverFactory resourceResolverFactory;
@referenceprivate WorkflowService workflowService;
How can I mock the above?
I tried something like below:
workflowServiceMock = context.registerInjectActivateService(workflowServiceMock);
But it throws NullPointerException
Can you please paste some more snippets or logic ? So that it will be more clear to investigate why the workflow session is returning NULLPOINTER_EXCEPTION
Based on the code you shared, context seems to be NULL, check that. If not please share code with error stack.