public static MutableInodeDirectory create(long id, long parentId, String name,
      CreateDirectoryContext context) {
    return new MutableInodeDirectory(id)
        .setParentId(parentId)
        .setName(name)
        .setTtl(context.getTtl())
        .setTtlAction(context.getTtlAction())
        .setOwner(context.getOwner().intern())
        .setGroup(context.getGroup().intern())
        .setMode(context.getMode().toShort())
        .setAcl(context.getAcl())
        // SetAcl call is also setting default AclEntries
        .setAcl(context.getDefaultAcl())
        .setMountPoint(context.isMountPoint())
        .setXAttr(context.getXAttr());
  }
@Test
  public void equalsTest() throws Exception {
    MutableInodeDirectory inode1 =
        MutableInodeDirectory.create(1, 0, "test1", CreateDirectoryContext.defaults());
    MutableInodeDirectory inode2 =
        MutableInodeDirectory.create(1, 0, "test2", CreateDirectoryContext.defaults());
    MutableInodeDirectory inode3 =
        MutableInodeDirectory.create(3, 0, "test3", CreateDirectoryContext.defaults());
    Assert.assertTrue(inode1.equals(inode2));
    Assert.assertTrue(inode1.equals(inode1));
    Assert.assertFalse(inode1.equals(inode3));
  }