I am using powermock to mock some native command invocation using process builder. the strange thing is these test pass sometimes and fail sometimes giving a NPE. Is this a powermock issue or some gotcha in the program.
the snippet of the class under test is..
and the unit test case is ..
I get an error on execution an the test case fails..
Note : I do not get this error on all executions. Sometimes it passes and sometimes it fails. I am not able to understand this behavior.
Also, I have camouflaged some variable names because of the copyright issues.. Please bear !!