The ProcessTreeTest gets a list of all processes (on windows) and has the pid=0 as the base of it
user has admin rights - tested with and without elevated privs)
When getEnvironment() is called in the test it causes an exception to be thrown.
Adding an explict check to ignore the Sytem Idle process can return yet another random process that the user may or may not have access to.
In my case it is returning PID=820 which is svchost.exe running as "LOCAL SERVICE"
in the non elevated admin case you see the following error
for the elevated case you see the following:
in either case the unit test fails.