SingleUGIResolver extends UGIResolver implements Configurable { @Override public String group(String s) { return group; }  @Override void setConf(Configuration conf); @Override Configuration getConf(); @Override String user(String s); @Override String group(String s); @Override void addUser(String name); @Override void addGroup(String name); static final String UID; static final String USER; static final String GID; static final String GROUP; }
@Test public void testAclResolution() { long perm; FsPermission p1 = new FsPermission((short)0755); FileStatus fileStatus = file("dingo", "dingo", p1); perm = ugi.getPermissionsProto(fileStatus, null); match(perm, p1); AclEntry aclEntry = new AclEntry.Builder() .setType(AclEntryType.USER) .setScope(AclEntryScope.ACCESS) .setPermission(FsAction.ALL) .setName("dingo") .build(); AclStatus aclStatus = new AclStatus.Builder() .owner("dingo") .group(("dingo")) .addEntry(aclEntry) .setPermission(p1) .build(); perm = ugi.getPermissionsProto(null, aclStatus); match(perm, p1); }