### Question:
GlobalAddressBook { public void deleteContact(String id) { addressBookMap.remove(id); }  String addContact(Contact contact); List<Contact> getAll(); Contact getContact(String contactId); void deleteContact(String id); IdGenerator getIdGenerator(); void setIdGenerator(IdGenerator idGenerator);  }### Answer:
@Test public void testDeleteContact() { Contact c1 = new Contact(); c1.setFirstName("Pedro"); Contact c2 = new Contact(); c2.setFirstName("Eduardo"); String idDeleted = addressBook.addContact(c1); addressBook.addContact(c2); addressBook.deleteContact(idDeleted); assertEquals(1, addressBook.getAll().size()); try { addressBook.getContact(idDeleted); fail("InvalidIdException expected"); } catch(InvalidIdException ex) { assertTrue(true); } }