@Override
    public void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry) throws BeansException {
        if(!registry.containsBeanDefinition(beanName)) {
            throw new NoSuchBeanDefinitionException(beanName, "Spock WrapWithSpy must reference an existing bean id.");
        }
    }
Wraps a given Spring bean with a detached Spock spy

Spring integration of spock mocks is heavily inspired by
Springockito {@see https://bitbucket.org/kubek2k/springockito}.

@author Taylor Wicksell
spock-spring/src/main/java/org/spockframework/spring/xml/SpockSpyBeanPostProcessor.java