public function replace(InteractionResponseProcessing $newInteractionResponseProcessing){
        $oldkey = null;
        foreach($this->components as $key => $component){
            if($component->getResponse() == $newInteractionResponseProcessing->getResponse()){
                $oldkey = $key;
                break;
            }
        }
        if(!is_null($oldkey)){
            unset($this->components[$oldkey]);
        }else{
            common_Logger::w('Component to be replaced not found', array('TAOITEMS', 'QTI'));
        }
        $this->add($newInteractionResponseProcessing);
    }