Business { public void addCustomerToPhoneBook(CustomerBean aCustomer) { if (aCustomer != null && aCustomer.getLastName() != null && aCustomer.getFirstName() != null) { String key = aCustomer.getLastName() + ", " + aCustomer.getFirstName(); customerPhoneBook.put(key, aCustomer.getPhoneNumber()); } } Business(); void addEmployee(EmployeeBean anEmployee); EmployeeBean getEmployee(String lastAndFirstName); String getCustomerPhoneNumber(String lastAndFirstName); String getAllCustomerPhoneNumbers(); void addCustomerToPhoneBook(CustomerBean aCustomer);  }
@Test public void testAddCustomer() { testBusiness.addCustomerToPhoneBook(sarah); int numEmployees = testBusiness.customerPhoneBook.size(); assertEquals(1, numEmployees); testBusiness.addCustomerToPhoneBook(joe); testBusiness.addCustomerToPhoneBook(alma); testBusiness.addCustomerToPhoneBook(hannah); numEmployees = testBusiness.customerPhoneBook.size(); assertEquals(4, numEmployees); testBusiness.addCustomerToPhoneBook(null); numEmployees = testBusiness.customerPhoneBook.size(); assertEquals(4, numEmployees); testBusiness.addCustomerToPhoneBook(customerNoLastName); numEmployees = testBusiness.customerPhoneBook.size(); assertEquals(4, numEmployees); testBusiness.addCustomerToPhoneBook(customerNoFirstName); numEmployees = testBusiness.customerPhoneBook.size(); assertEquals(4, numEmployees); testBusiness.customerPhoneBook.clear(); }