fixed unit tests when env vars are set

Change-Id: Ia73c10c7c81b9434895941ea29282dbcdc667556
Merge "fixed unit tests when env vars are set"