public function merge(array $policies) {
        $last = reset($policies);
        for($i = 1; $i < count($policies); ++$i) {
            if($policies[$i]->isPriorityGreaterThanOrEqualTo($last)) {
                $last = $policies[$i];
            }
        }
        return $last;
    }