YARN-2519. Credential Provider related unit tests failed on Windows. Contributed by Xiaoyu Yao.

(cherry picked from commit cbea1b10efd871d04c648af18449dc724685db74)