/**
  * Calls Methods on the Object
  *
  * @param string $method
  * @param array $params
  * @return mixed [AbstractScalar if type is the same after the operation|mixed value if type changes]
  */
 public function __call($method, array $params)
 {
     array_unshift($params, $this);
     $result = call_user_func_array(array(OperationRegistry::get($method), 'direct'), $params);
     if ($this->validator->isValid($result)) {
         return $this->setValue($result);
     }
     return $result;
 }
 public function testGetOperation()
 {
     $toUpper = new ToUpper();
     $this->assertEquals($toUpper, OperationRegistry::get('ToUpper'));
 }