public function mock(string $class) : MockedCode
    {
        $generator = new MockCodeGenerator($this->vfsRoot);
    
        try{
            $rc = new \ReflectionClass($class);
            return $generator->generate($rc);
        }
        catch(\ReflectionException $e){
            throw new DecoyException('Class not found: ' . $class, $e);
        }
        catch(MockCodeGeneratorException $e){
            throw new DecoyException('Failed to generate mock code for class: ' . $class, $e);
        }
    }