use of org.glassfish.hk2.utilities.binding.AbstractBinder in project jersey by jersey.
the class InjectionManagerTest method testServiceLocatorParent.
@Test
public void testServiceLocatorParent() {
AbstractBinder binder = new AbstractBinder() {
@Override
protected void configure() {
bindAsContract(EnglishGreeting.class);
}
};
ServiceLocator parentLocator = ServiceLocatorUtilities.bind(binder);
InjectionManager injectionManager = new HK2InjectionManager();
injectionManager.initialize(parentLocator);
assertNotNull(injectionManager.getInstance(EnglishGreeting.class));
}
Aggregations