public static User getDifferentUser(final Configuration c, final String differentiatingSuffix)
    throws IOException {
    FileSystem currentfs = FileSystem.get(c);
    if (!(currentfs instanceof DistributedFileSystem) || User.isHBaseSecurityEnabled(c)) {
      return User.getCurrent();
    }
    // Else distributed filesystem. Make a new instance per daemon. Below
    // code is taken from the AppendTestUtil over in hdfs.
    String username = User.getCurrent().getName() + differentiatingSuffix;
    User user = User.createUserForTesting(c, username, new String[] { "supergroup" });
    return user;
  }
This method clones the passed <code>c</code> configuration setting a new user into the clone.
Use it getting new instances of FileSystem. Only works for DistributedFileSystem w/o Kerberos.
@param c                     Initial configuration
@param differentiatingSuffix Suffix to differentiate this user from others.
@return A new configuration instance with a different user set into it.
hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtil.java