@Test(timeout=10000)
public void testSetLoginUser() throws IOException {

  UserGroupInformation ugi = UserGroupInformation.createRemoteUser("test-user");
  UserGroupInformation.setLoginUser(ugi);
  assertEquals(ugi, UserGroupInformation.getLoginUser());
}