public static User createUserForTesting(Configuration conf, String name, String[] groups) {
    User userForTesting = SecureHadoopUser.createUserForTesting(conf, name, groups);
    return userForTesting;
  }
Generates a new {@code User} instance specifically for use in test code.
@param name   the full username
@param groups the group names to which the test user will belong
@return a new <code>User</code> instance
hbase-common/src/main/java/org/apache/hadoop/hbase/security/User.java