@Test public void modulesAreSortedByPriority() throws Exception { this.moduleList.add(this.mediumPriorityModule); this.moduleList.add(this.lowPriorityModule); this.moduleList.add(this.highPriorityModule); List<RecordConfigurationModule> expectedList = Arrays.asList(this.lowPriorityModule, this.mediumPriorityModule, this.highPriorityModule); List<RecordConfigurationModule> actualList = this.mocker.getComponentUnderTest().get(); Assert.assertEquals(expectedList, actualList); }
@Override public List<RecordConfigurationModule> get() { try { List<RecordConfigurationModule> modules = new LinkedList<>(); modules.addAll(this.cm.<RecordConfigurationModule>getInstanceList(RecordConfigurationModule.class)); Collections.sort(modules, ModulePriorityComparator.INSTANCE); return modules; } catch (ComponentLookupException ex) { throw new RuntimeException("Failed to look up record configuration modules: " + ex.getMessage(), ex); } }
RecordConfigurationModuleProvider implements Provider<List<RecordConfigurationModule>> { @Override public List<RecordConfigurationModule> get() { try { List<RecordConfigurationModule> modules = new LinkedList<>(); modules.addAll(this.cm.<RecordConfigurationModule>getInstanceList(RecordConfigurationModule.class)); Collections.sort(modules, ModulePriorityComparator.INSTANCE); return modules; } catch (ComponentLookupException ex) { throw new RuntimeException("Failed to look up record configuration modules: " + ex.getMessage(), ex); } } }
RecordConfigurationModuleProvider implements Provider<List<RecordConfigurationModule>> { @Override public List<RecordConfigurationModule> get() { try { List<RecordConfigurationModule> modules = new LinkedList<>(); modules.addAll(this.cm.<RecordConfigurationModule>getInstanceList(RecordConfigurationModule.class)); Collections.sort(modules, ModulePriorityComparator.INSTANCE); return modules; } catch (ComponentLookupException ex) { throw new RuntimeException("Failed to look up record configuration modules: " + ex.getMessage(), ex); } }  }
RecordConfigurationModuleProvider implements Provider<List<RecordConfigurationModule>> { @Override public List<RecordConfigurationModule> get() { try { List<RecordConfigurationModule> modules = new LinkedList<>(); modules.addAll(this.cm.<RecordConfigurationModule>getInstanceList(RecordConfigurationModule.class)); Collections.sort(modules, ModulePriorityComparator.INSTANCE); return modules; } catch (ComponentLookupException ex) { throw new RuntimeException("Failed to look up record configuration modules: " + ex.getMessage(), ex); } }  @Override List<RecordConfigurationModule> get(); }
RecordConfigurationModuleProvider implements Provider<List<RecordConfigurationModule>> { @Override public List<RecordConfigurationModule> get() { try { List<RecordConfigurationModule> modules = new LinkedList<>(); modules.addAll(this.cm.<RecordConfigurationModule>getInstanceList(RecordConfigurationModule.class)); Collections.sort(modules, ModulePriorityComparator.INSTANCE); return modules; } catch (ComponentLookupException ex) { throw new RuntimeException("Failed to look up record configuration modules: " + ex.getMessage(), ex); } }  @Override List<RecordConfigurationModule> get();  }