### Question:
DbAddressBook implements GlobalAddressBook { @Override public List<Contact> getAll() { return addressBookDao.getAll(); }  @Override String addContact(Contact contact); @Override Contact getContact(String contactId); AddressBookDao getAddressBookDao(); void setAddressBookDao(AddressBookDao addressBookDao); @Override List<Contact> getAll(); @Override void deleteContact(String id);  }### Answer:
@Test public void testGetAll() throws ParseException { Date expedtedBirthday = dateFormat.parse("8/1/1974"); Contact c1 = new Contact(); c1.setFirstName("Pedro"); c1.setSurname("Ballesteros"); c1.setBirthday(expedtedBirthday); c1.setPhone("610101010"); Contact c2 = new Contact(); c2.setFirstName("Eduardo"); c2.setSurname("Ballesteros"); c2.setBirthday(expedtedBirthday); c2.setPhone("610101010"); when(mockAddressBookDao.getAll()).thenReturn(Arrays.asList(c1, c2)); List<Contact> contacts = addressBook.getAll(); assertEquals(2, contacts.size()); assertTrue(contacts.containsAll(Arrays.asList(c2, c1))); assertThat(contacts, hasItems(c2, c1)); }