This commit introduces a test which verifies that @MockitoSpyBean on a field with generics can be used to replace an existing bean with matching generics that's produced by a FactoryBean that's programmatically registered via an ImportBeanDefinitionRegistrar. However, the test is currently @Disabled until the fix for https://github.com/spring-projects/spring-boot/issues/40234 has been ported to Spring Framework. See gh-33742