public function vote($candidates, Request $request)
    {
        $this->candidates   = $candidates;
        $this->request      = $request;

        // Prioritise candidates
        $this->prioritseCandidates();

        for ($i=$this->priority; $i >= 0 ; $i--) { 
            if (isset($this->prioritised[$i]) && !empty($this->prioritised[$i])) {
                return $this->prioritised[$i][0];
            }
        }

        throw new ResourceNotFoundException(sprintf('No routes found for path %s and method %s.', $this->request->getPathInfo(), $this->request->getMethod()), 404);
    }