@Test public void nullFirstReturnedFromNoProviders() throws ComponentLookupException { when(this.providersProvider.get()).thenReturn(Collections.<PatientContactProvider>emptyList()); Assert.assertNull(this.mocker.getComponentUnderTest().getFirst(this.patient)); }
@Override public ContactInfo getFirst(Patient patient) { List<ContactInfo> all = getAll(patient); if (!all.isEmpty()) { return all.get(0); } return null; }
DefaultPatientContactsManager implements PatientContactsManager { @Override public ContactInfo getFirst(Patient patient) { List<ContactInfo> all = getAll(patient); if (!all.isEmpty()) { return all.get(0); } return null; } }
DefaultPatientContactsManager implements PatientContactsManager { @Override public ContactInfo getFirst(Patient patient) { List<ContactInfo> all = getAll(patient); if (!all.isEmpty()) { return all.get(0); } return null; }  }
DefaultPatientContactsManager implements PatientContactsManager { @Override public ContactInfo getFirst(Patient patient) { List<ContactInfo> all = getAll(patient); if (!all.isEmpty()) { return all.get(0); } return null; }  @Override List<ContactInfo> getAll(Patient patient); @Override ContactInfo getFirst(Patient patient); }
DefaultPatientContactsManager implements PatientContactsManager { @Override public ContactInfo getFirst(Patient patient) { List<ContactInfo> all = getAll(patient); if (!all.isEmpty()) { return all.get(0); } return null; }  @Override List<ContactInfo> getAll(Patient patient); @Override ContactInfo getFirst(Patient patient);  }