MyContainerInjectionProvider extends DiscoverableInjectionProvider { public void invokePreDestroy(Object instance) throws InjectionProviderException { Method preDestroy = AnnotationUtils.findPreDestroy(instance); if (preDestroy != null) { invokeMethod(instance, preDestroy); } } MyContainerInjectionProvider(); void inject(Object instance); void invokePostConstruct(Object instance); void invokePreDestroy(Object instance);  }
@Test public void testInvokePreDestroy() throws Exception { ManagedBean mb = new ManagedBean(); provider.invokePreDestroy(mb); assertTrue(preDestroy); }