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