@Test public void emptyListReturnedWhenNoProvidersAreAvailable() throws ComponentLookupException { List<PatientContactProvider> result = this.mocker.getComponentUnderTest().get(); Assert.assertTrue(result.isEmpty()); }
@Override public List<PatientContactProvider> get() { try { List<PatientContactProvider> services = new LinkedList<>(); services .addAll(this.componentManager.<PatientContactProvider>getInstanceList(PatientContactProvider.class)); Collections.sort(services, PatientContactProviderComparator.INSTANCE); return services; } catch (ComponentLookupException ex) { return Collections.emptyList(); } }
PatientContactProviderListProvider implements Provider<List<PatientContactProvider>> { @Override public List<PatientContactProvider> get() { try { List<PatientContactProvider> services = new LinkedList<>(); services .addAll(this.componentManager.<PatientContactProvider>getInstanceList(PatientContactProvider.class)); Collections.sort(services, PatientContactProviderComparator.INSTANCE); return services; } catch (ComponentLookupException ex) { return Collections.emptyList(); } } }
PatientContactProviderListProvider implements Provider<List<PatientContactProvider>> { @Override public List<PatientContactProvider> get() { try { List<PatientContactProvider> services = new LinkedList<>(); services .addAll(this.componentManager.<PatientContactProvider>getInstanceList(PatientContactProvider.class)); Collections.sort(services, PatientContactProviderComparator.INSTANCE); return services; } catch (ComponentLookupException ex) { return Collections.emptyList(); } }  }
PatientContactProviderListProvider implements Provider<List<PatientContactProvider>> { @Override public List<PatientContactProvider> get() { try { List<PatientContactProvider> services = new LinkedList<>(); services .addAll(this.componentManager.<PatientContactProvider>getInstanceList(PatientContactProvider.class)); Collections.sort(services, PatientContactProviderComparator.INSTANCE); return services; } catch (ComponentLookupException ex) { return Collections.emptyList(); } }  @Override List<PatientContactProvider> get(); }
PatientContactProviderListProvider implements Provider<List<PatientContactProvider>> { @Override public List<PatientContactProvider> get() { try { List<PatientContactProvider> services = new LinkedList<>(); services .addAll(this.componentManager.<PatientContactProvider>getInstanceList(PatientContactProvider.class)); Collections.sort(services, PatientContactProviderComparator.INSTANCE); return services; } catch (ComponentLookupException ex) { return Collections.emptyList(); } }  @Override List<PatientContactProvider> get();  }