How can I enable CDI with Jersey Test Framework?
I found How can I inject a data source dependency into a RESTful web service with Jersey (Test Framework)? but I think I'm gonna ask a little bit different question. This is a follow-up question of @PostConstruct of abstract ancestors are not invoked I wrote a JAX-RS library and I'm trying to unit-test with Jersey Test Framework . I seems HK2 injects properly. But I found some of my life cycle interceptor method annotated with @PostConstruct or @PreDestroy aren't invoked (or only some invoked). public class MyResource { @PostConstruct private void constructed() { // not invoked } @Inject