@Override
  protected ObjectPermissions getPermissions() {
    return mPermissions.get();
  }
@Test
  public void getPermissionsWithMapping() throws Exception {
    Map<PropertyKey, Object> conf = new HashMap<>();
    conf.put(PropertyKey.UNDERFS_S3_OWNER_ID_TO_USERNAME_MAPPING, "111=altname");
    try (Closeable c = new ConfigurationRule(conf, CONF).toResource()) {
      S3AUnderFileSystem s3UnderFileSystem =
          new S3AUnderFileSystem(
              new AlluxioURI("s3a://" + BUCKET_NAME), mClient, mAsyncClient, BUCKET_NAME,
              mExecutor, mManager, UnderFileSystemConfiguration.defaults(CONF), false, false);

      Mockito.when(mClient.getS3AccountOwner()).thenReturn(new Owner("111", "test"));
      Mockito.when(mClient.getBucketAcl(Mockito.anyString())).thenReturn(new AccessControlList());
      ObjectUnderFileSystem.ObjectPermissions permissions = s3UnderFileSystem.getPermissions();

      Assert.assertEquals("altname", permissions.getOwner());
      Assert.assertEquals("altname", permissions.getGroup());
      Assert.assertEquals(0, permissions.getMode());
    }
  }