public virtual void TestUgi() { UserGroupInformation otherUser = UserGroupInformation.CreateRemoteUser("otherUser" ); FileContext newFc = otherUser.DoAs(new _PrivilegedExceptionAction_194()); Assert.Equal("otherUser", newFc.GetUgi().GetUserName()); }