### Question:
User { public static User getCurrent() throws IOException { User user; if (IS_SECURE_HADOOP) { user = new SecureHadoopUser(); } else { user = new HadoopUser(); } if (user.getUGI() == null) { return null; } return user; }  UserGroupInformation getUGI(); String getName(); String[] getGroupNames(); abstract String getShortName(); abstract T runAs(PrivilegedAction<T> action); abstract T runAs(PrivilegedExceptionAction<T> action); abstract void obtainAuthTokenForJob(Configuration conf, Job job); abstract void obtainAuthTokenForJob(JobConf job); String toString(); static User getCurrent(); static User create(UserGroupInformation ugi); static User createUserForTesting(Configuration conf,
      String name, String[] groups); static void login(Configuration conf, String fileConfKey,
      String principalConfKey, String localhost); static boolean isSecurityEnabled(); static boolean isHBaseSecurityEnabled(Configuration conf); static final String HBASE_SECURITY_CONF_KEY; }### Answer:
@Test public void testGetCurrent() throws Exception { User user1 = User.getCurrent(); assertNotNull(user1.ugi); LOG.debug("User1 is "+user1.getName()); for (int i =0 ; i< 100; i++) { User u = User.getCurrent(); assertNotNull(u); assertEquals(user1.getName(), u.getName()); } }