public function __construct(MockConfiguration $config, $code)
 {
     if (!$config->getName()) {
         throw new \InvalidArgumentException("MockConfiguration must contain a name");
     }
     $this->config = $config;
     $this->code = $code;
 }