Buggy code:
public class InjectAnnotationBeanPostProcessorTests { @ Test public void testIncompleteBeanDefinition ( ) { } @ Test public void testResourceInjection ( ) { } @ Test public void testExtendedResourceInjection ( ) { } @ Test public void testExtendedResourceInjectionWithOverriding ( ) { DefaultListableBeanFactory bf = new DefaultListableBeanFactory ( ) ; bf . registerResolvableDependency ( BeanFactory . class , bf ) ; AutowiredAnnotationBeanPostProcessor bpp = new AutowiredAnnotationBeanPostProcessor ( ) ; bpp . setBeanFactory ( bf ) ; bf . addBeanPostProcessor ( bpp ) ; RootBeanDefinition annotatedBd = new RootBeanDefinition ( InjectAnnotationBeanPostProcessorTests . TypedExtendedResourceInjectionBean . class ) ; TestBean tb2 = new TestBean ( ) ; <START_BUG> annotatedBd . getPropertyValues ( ) . addPropertyValue ( "testBean2" , tb2 ) ; <END_BUG> bf . registerBeanDefinition ( "annotatedBean" , annotatedBd ) ; TestBean tb = new TestBean ( ) ; bf . registerSingleton ( "testBean" , tb ) ; NestedTestBean ntb = new NestedTestBean ( ) ; bf . registerSingleton ( "nestedTestBean" , ntb ) ; InjectAnnotationBeanPostProcessorTests . TypedExtendedResourceInjectionBean bean = ( ( InjectAnnotationBeanPostProcessorTests . TypedExtendedResourceInjectionBean ) ( bf . getBean ( "annotatedBean" ) ) ) ; assertSame ( tb , bean . getTestBean ( ) ) ; assertSame ( tb2 , bean . getTestBean2 ( ) ) ; assertSame ( tb , bean . getTestBean3 ( ) ) ; assertSame ( tb , bean . getTestBean4 ( ) ) ; assertSame ( ntb , bean . getNestedTestBean ( ) ) ; assertSame ( bf , bean . getBeanFactory ( ) ) ; bf . destroySingletons ( ) ; } @ Test public void testExtendedResourceInjectionWithAtRequired ( ) { } @ Test public void testConstructorResourceInjection ( ) { } @ Test public void testConstructorResourceInjectionWithMultipleCandidatesAsCollection ( ) { } @ Test public void testConstructorResourceInjectionWithMultipleCandidatesAndFallback ( ) { } @ Test public void testConstructorInjectionWithMap ( ) { } @ Test public void testFieldInjectionWithMap ( ) { } @ Test public void testMethodInjectionWithMap ( ) { } @ Test public void testMethodInjectionWithMapAndMultipleMatches ( ) { } @ Test public void testMethodInjectionWithMapAndMultipleMatchesButOnlyOneAutowireCandidate ( ) { } @ Test public void testObjectFactoryInjection ( ) { } @ Test public void testObjectFactoryQualifierInjection ( ) { } @ Test public void testObjectFactorySerialization ( ) throws Exception { } @ Test public void testBeanAutowiredWithFactoryBean ( ) { } public static class ResourceInjectionBean { @ Inject private TestBean testBean ; private TestBean testBean2 ; @ Inject public void setTestBean2 ( TestBean testBean2 ) { } public TestBean getTestBean ( ) { } public TestBean getTestBean2 ( ) { } } public static class ExtendedResourceInjectionBean < T > extends InjectAnnotationBeanPostProcessorTests . ResourceInjectionBean { @ Inject protected ITestBean testBean3 ; private T nestedTestBean ; private ITestBean testBean4 ; private BeanFactory beanFactory ; public ExtendedResourceInjectionBean ( ) { } @ Inject @ Required public void setTestBean2 ( TestBean testBean2 ) { } @ Inject private void inject ( ITestBean testBean4 , T nestedTestBean ) { } @ Inject protected void initBeanFactory ( BeanFactory beanFactory ) { } public ITestBean getTestBean3 ( ) { } public ITestBean getTestBean4 ( ) { } public T getNestedTestBean ( ) { } public BeanFactory getBeanFactory ( ) { } } public static class TypedExtendedResourceInjectionBean extends InjectAnnotationBeanPostProcessorTests . ExtendedResourceInjectionBean < NestedTestBean > { } public static class OptionalResourceInjectionBean extends InjectAnnotationBeanPostProcessorTests . ResourceInjectionBean { @ Inject protected ITestBean testBean3 ; private IndexedTestBean indexedTestBean ; private NestedTestBean [ ] nestedTestBeans ; @ Inject public NestedTestBean [ ] nestedTestBeansField ; private ITestBean testBean4 ; @ Inject public void setTestBean2 ( TestBean testBean2 ) { } @ Inject private void inject ( ITestBean testBean4 , NestedTestBean [ ] nestedTestBeans , IndexedTestBean indexedTestBean ) { } public ITestBean getTestBean3 ( ) { } public ITestBean getTestBean4 ( ) { } public IndexedTestBean getIndexedTestBean ( ) { } public NestedTestBean [ ] getNestedTestBeans ( ) { } } public static class OptionalCollectionResourceInjectionBean extends InjectAnnotationBeanPostProcessorTests . ResourceInjectionBean { @ Inject protected ITestBean testBean3 ; private IndexedTestBean indexedTestBean ; private List < NestedTestBean > nestedTestBeans ; public List < NestedTestBean > nestedTestBeansSetter ; @ Inject public List < NestedTestBean > nestedTestBeansField ; private ITestBean testBean4 ; @ Inject public void setTestBean2 ( TestBean testBean2 ) { } @ Inject private void inject ( ITestBean testBean4 , List < NestedTestBean > nestedTestBeans , IndexedTestBean indexedTestBean ) { } @ Inject public void setNestedTestBeans ( List < NestedTestBean > nestedTestBeans ) { } public ITestBean getTestBean3 ( ) { } public ITestBean getTestBean4 ( ) { } public IndexedTestBean getIndexedTestBean ( ) { } public List < NestedTestBean > getNestedTestBeans ( ) { } } public static class ConstructorResourceInjectionBean extends InjectAnnotationBeanPostProcessorTests . ResourceInjectionBean { @ Inject protected ITestBean testBean3 ; private ITestBean testBean4 ; private NestedTestBean nestedTestBean ; private ConfigurableListableBeanFactory beanFactory ; public ConstructorResourceInjectionBean ( ) { } public ConstructorResourceInjectionBean ( ITestBean testBean3 ) { } @ Inject public ConstructorResourceInjectionBean ( ITestBean testBean4 , NestedTestBean nestedTestBean , ConfigurableListableBeanFactory beanFactory ) { } public ConstructorResourceInjectionBean ( NestedTestBean nestedTestBean ) { } public ConstructorResourceInjectionBean ( ITestBean testBean3 , ITestBean testBean4 , NestedTestBean nestedTestBean ) { } @ Inject public void setTestBean2 ( TestBean testBean2 ) { } public ITestBean getTestBean3 ( ) { } public ITestBean getTestBean4 ( ) { } public NestedTestBean getNestedTestBean ( ) { } public ConfigurableListableBeanFactory getBeanFactory ( ) { } } public static class ConstructorsResourceInjectionBean { protected ITestBean testBean3 ; private ITestBean testBean4 ; private NestedTestBean [ ] nestedTestBeans ; public ConstructorsResourceInjectionBean ( ) { } @ Inject public ConstructorsResourceInjectionBean ( ITestBean testBean3 ) { } public ConstructorsResourceInjectionBean ( ITestBean testBean4 , NestedTestBean [ ] nestedTestBeans ) { } public ConstructorsResourceInjectionBean ( NestedTestBean nestedTestBean ) { } public ConstructorsResourceInjectionBean ( ITestBean testBean3 , ITestBean testBean4 , NestedTestBean nestedTestBean ) { } public ITestBean getTestBean3 ( ) { } public ITestBean getTestBean4 ( ) { } public NestedTestBean [ ] getNestedTestBeans ( ) { } } public static class ConstructorsCollectionResourceInjectionBean { protected ITestBean testBean3 ; private ITestBean testBean4 ; private List < NestedTestBean > nestedTestBeans ; public ConstructorsCollectionResourceInjectionBean ( ) { } public ConstructorsCollectionResourceInjectionBean ( ITestBean testBean3 ) { }

Fix:
annotatedBd . getPropertyValues ( ) . add ( "testBean2" , tb2 ) ;