public function getClassAce($objectIdentity, $sid)
    {
        $this->enforceObjectIdentity($objectIdentity);
        $this->enforceSecurityIdentity($sid);

        $acl = $this->securityContext->getACLProvider()->findAcl($objectIdentity);

        foreach ($acl->getClassAces() as $index => $ace) {
            if ($ace->getSecurityIdentity()->equals($sid)) {
                return $ace;
            }
        }

        throw new InvalidArgumentException('ACE not found for the supplied combination of ObjectIdentity and SecurityIdentity');
    }