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