@Test
public void should_register_spy_replacement_in_registration_context() {

	//given
	final Service service = new Service();
	final String serviceName = "service";
	final DoubleDefinition definition = DoubleDefinition.builder()
			.doubleClass(Service.class)
			.name(serviceName)
			.build();
	final TestContextBuilder.TestContext testContext = new TestContextBuilder()
			.withBean(serviceName, service)
			.withSpy(definition)
			.build();
	final ToSpyReplacingProcessor processor = testContext.toSpyReplacingProcessor;
	//when
	processor.postProcessAfterInitialization(service, serviceName);
	//then
	assertTrue(testContext
			.doubleDefinitionsRegistrationContext
			.isBeanDefinitionRegisteredForDouble(definition));
}