### Question:
OzoneAclUtil { public static boolean removeAcl(List<OzoneAcl> existingAcls, OzoneAcl acl) { if (existingAcls == null || existingAcls.isEmpty() || acl == null) { return false; } for (OzoneAcl a: existingAcls) { if (a.getName().equals(acl.getName()) && a.getType().equals(acl.getType()) && a.getAclScope().equals(acl.getAclScope())) { BitSet current = a.getAclBitSet(); BitSet original = (BitSet) current.clone(); current.andNot(acl.getAclBitSet()); if (current.equals(original)) { return false; } if (current.isEmpty()) { existingAcls.remove(a); } return true; } } return false; } private  OzoneAclUtil(); static List<OzoneAcl> getAclList(String userName,
      String[] userGroups, ACLType userRights, ACLType groupRights); static boolean checkAclRight(List<OzoneAcl> acls,
      RequestContext context); static boolean checkAclRights(List<OzoneAcl> acls,
      RequestContext context); static boolean checkIfAclBitIsSet(IAccessAuthorizer.ACLType acl,
      BitSet bitset); static boolean inheritDefaultAcls(List<OzoneAcl> acls,
      List<OzoneAcl> parentAcls); static List<OzoneAcl> fromProtobuf(List<OzoneAclInfo> protoAcls); static List<OzoneAclInfo> toProtobuf(List<OzoneAcl> protoAcls); static boolean addAcl(List<OzoneAcl> existingAcls, OzoneAcl acl); static boolean removeAcl(List<OzoneAcl> existingAcls, OzoneAcl acl); static boolean setAcl(List<OzoneAcl> existingAcls,
      List<OzoneAcl> newAcls);  }### Answer:
@Test public void testRemoveAcl() { List<OzoneAcl> currentAcls = null; removeAndVerifyAcl(currentAcls, USER1, false, 0); addAndVerifyAcl(currentAcls, USER1, false, 0); removeAndVerifyAcl(currentAcls, USER1, false, 0); currentAcls = getDefaultAcls(); assertTrue(currentAcls.size() > 0); OzoneAcl oldAcl = currentAcls.get(0); OzoneAcl newAcl = new OzoneAcl(oldAcl.getType(), oldAcl.getName(), ACLType.READ_ACL, ACCESS); removeAndVerifyAcl(currentAcls, USER1, false, DEFAULT_ACLS.size()); removeAndVerifyAcl(currentAcls, newAcl, false, DEFAULT_ACLS.size()); addAndVerifyAcl(currentAcls, newAcl, true, DEFAULT_ACLS.size()); removeAndVerifyAcl(currentAcls, newAcl, true, DEFAULT_ACLS.size()); removeAndVerifyAcl(currentAcls, oldAcl, true, DEFAULT_ACLS.size() - 1); }