@Test(expected = RuntimeException.class) public void componentLookupExceptionIsCaughtAndRuntimeExceptionIsThrown() throws ComponentLookupException { doThrow(new ComponentLookupException("test")).when(this.componentManager).getInstanceList( AuthorizationModule.class); this.mocker.getComponentUnderTest().get(); }
@Override public List<AuthorizationModule> get() { try { List<AuthorizationModule> services = new LinkedList<>(); services.addAll(this.componentManager.<AuthorizationModule>getInstanceList(AuthorizationModule.class)); Collections.sort(services, AuthorizationModuleComparator.INSTANCE); return services; } catch (ComponentLookupException ex) { throw new RuntimeException("Failed to look up authorization modules", ex); } }
AuthorizationModuleListProvider implements Provider<List<AuthorizationModule>> { @Override public List<AuthorizationModule> get() { try { List<AuthorizationModule> services = new LinkedList<>(); services.addAll(this.componentManager.<AuthorizationModule>getInstanceList(AuthorizationModule.class)); Collections.sort(services, AuthorizationModuleComparator.INSTANCE); return services; } catch (ComponentLookupException ex) { throw new RuntimeException("Failed to look up authorization modules", ex); } } }
AuthorizationModuleListProvider implements Provider<List<AuthorizationModule>> { @Override public List<AuthorizationModule> get() { try { List<AuthorizationModule> services = new LinkedList<>(); services.addAll(this.componentManager.<AuthorizationModule>getInstanceList(AuthorizationModule.class)); Collections.sort(services, AuthorizationModuleComparator.INSTANCE); return services; } catch (ComponentLookupException ex) { throw new RuntimeException("Failed to look up authorization modules", ex); } }  }
AuthorizationModuleListProvider implements Provider<List<AuthorizationModule>> { @Override public List<AuthorizationModule> get() { try { List<AuthorizationModule> services = new LinkedList<>(); services.addAll(this.componentManager.<AuthorizationModule>getInstanceList(AuthorizationModule.class)); Collections.sort(services, AuthorizationModuleComparator.INSTANCE); return services; } catch (ComponentLookupException ex) { throw new RuntimeException("Failed to look up authorization modules", ex); } }  @Override List<AuthorizationModule> get(); }
AuthorizationModuleListProvider implements Provider<List<AuthorizationModule>> { @Override public List<AuthorizationModule> get() { try { List<AuthorizationModule> services = new LinkedList<>(); services.addAll(this.componentManager.<AuthorizationModule>getInstanceList(AuthorizationModule.class)); Collections.sort(services, AuthorizationModuleComparator.INSTANCE); return services; } catch (ComponentLookupException ex) { throw new RuntimeException("Failed to look up authorization modules", ex); } }  @Override List<AuthorizationModule> get();  }