@Test public void testInitializeSaveTheServiceLocator() { givenServiceLocator(); underTest.initialize(serviceLocator); ServiceLocator initializedServiceLocator = Deencapsulation.getField(underTest, ServiceLocator.class); assertThat(initializedServiceLocator).isEqualTo(serviceLocator); }
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();  }