bpp.setDestroyAnnotationType(PreDestroy.class);
InitDestroyAnnotationBeanPostProcessor bpp2 = (InitDestroyAnnotationBeanPostProcessor)
SerializationTestUtils.serializeAndDeserialize(bpp);
AnnotatedInitDestroyBean bean = new AnnotatedInitDestroyBean();
bpp2.postProcessBeforeDestruction(bean, "annotatedBean");
assertTrue(bean.destroyCalled);
}
public void testResourceInjection() {
DefaultListableBeanFactory bf = new DefaultListableBeanFactory();