### Question:
DoubleDefinitionsRegistrationContext { public void registerSpy(BeanDefinitionRegistry registry, DoubleDefinition spyDefinition) { registerBeanDefinition( spyDefinition, spyDefinition.getName(), registry, buildBeanDefinition(CREATE_SPY_FACTORY_METHOD, spyDefinition, NULL_OBJECT_TO_SPY_ON, spyDefinition)); }  void registerSpyReplacement(DoubleDefinition spyDefinition); void registerMock(BeanDefinitionRegistry registry, String definitionName, DoubleDefinition mockDefinition); void registerMock(BeanDefinitionRegistry registry, DoubleDefinition mockDefinition); void registerSpy(BeanDefinitionRegistry registry, DoubleDefinition spyDefinition); boolean isBeanDefinitionRegisteredForDouble(DoubleDefinition definition); static final String BEAN_NAME; }### Answer:
@Test public void should_register_spy_creation() { final DefaultListableBeanFactory beanFactory = new DefaultListableBeanFactory(); final DoubleDefinition spyDefinition = DoubleDefinition.builder() .name("spy") .doubleClass(Object.class) .build(); registrationContext.registerSpy(beanFactory, spyDefinition); bootstrapApplicationContext(beanFactory); Mockito .verify(doubleFactory) .createSpy(null, spyDefinition); }