@Test public void testPrepareHK2Bridge(@Mocked final GuiceBridge guiceBridge) { givenServiceLocator(); new Expectations() {{ serviceLocator.getService(GuiceIntoHK2Bridge.class); result = guiceIntoHK2Bridge; }}; underTest.initialize(serviceLocator); new Verifications() {{ guiceBridge.initializeGuiceBridge(serviceLocator); serviceLocator.getService(GuiceIntoHK2Bridge.class); guiceIntoHK2Bridge.bridgeGuiceInjector(injector); }}; }
public void initialize(InjectionManager injectionManager) { if (injectionManager instanceof ImmediateHk2InjectionManager) { initialize(((ImmediateHk2InjectionManager) injectionManager).getServiceLocator()); } else if (injectionManager instanceof DelayedHk2InjectionManager) { initialize(((DelayedHk2InjectionManager) injectionManager).getServiceLocator()); } else { throw SeedException.createNew(Jersey2ErrorCode.UNSUPPORTED_JERSEY_DEPENDENCY_INJECTION); } }
GuiceComponentProvider implements ComponentProvider { public void initialize(InjectionManager injectionManager) { if (injectionManager instanceof ImmediateHk2InjectionManager) { initialize(((ImmediateHk2InjectionManager) injectionManager).getServiceLocator()); } else if (injectionManager instanceof DelayedHk2InjectionManager) { initialize(((DelayedHk2InjectionManager) injectionManager).getServiceLocator()); } else { throw SeedException.createNew(Jersey2ErrorCode.UNSUPPORTED_JERSEY_DEPENDENCY_INJECTION); } } }
GuiceComponentProvider implements ComponentProvider { public void initialize(InjectionManager injectionManager) { if (injectionManager instanceof ImmediateHk2InjectionManager) { initialize(((ImmediateHk2InjectionManager) injectionManager).getServiceLocator()); } else if (injectionManager instanceof DelayedHk2InjectionManager) { initialize(((DelayedHk2InjectionManager) injectionManager).getServiceLocator()); } else { throw SeedException.createNew(Jersey2ErrorCode.UNSUPPORTED_JERSEY_DEPENDENCY_INJECTION); } }  }
GuiceComponentProvider implements ComponentProvider { public void initialize(InjectionManager injectionManager) { if (injectionManager instanceof ImmediateHk2InjectionManager) { initialize(((ImmediateHk2InjectionManager) injectionManager).getServiceLocator()); } else if (injectionManager instanceof DelayedHk2InjectionManager) { initialize(((DelayedHk2InjectionManager) injectionManager).getServiceLocator()); } else { throw SeedException.createNew(Jersey2ErrorCode.UNSUPPORTED_JERSEY_DEPENDENCY_INJECTION); } }  void initialize(InjectionManager injectionManager); @Override boolean bind(Class<?> component, Set<Class<?>> providerContracts); @Override void done(); }
GuiceComponentProvider implements ComponentProvider { public void initialize(InjectionManager injectionManager) { if (injectionManager instanceof ImmediateHk2InjectionManager) { initialize(((ImmediateHk2InjectionManager) injectionManager).getServiceLocator()); } else if (injectionManager instanceof DelayedHk2InjectionManager) { initialize(((DelayedHk2InjectionManager) injectionManager).getServiceLocator()); } else { throw SeedException.createNew(Jersey2ErrorCode.UNSUPPORTED_JERSEY_DEPENDENCY_INJECTION); } }  void initialize(InjectionManager injectionManager); @Override boolean bind(Class<?> component, Set<Class<?>> providerContracts); @Override void done();  }