Business { public String getAllCustomerPhoneNumbers() { StringBuffer phoneNumberBuffer = new StringBuffer(); TreeSet<String> sortedKeys = new TreeSet<String>(customerPhoneBook.keySet()); for(String aKey : sortedKeys){ String phoneNumber = customerPhoneBook.get(aKey); phoneNumberBuffer.append(aKey); phoneNumberBuffer.append(" - "); phoneNumberBuffer.append(phoneNumber); phoneNumberBuffer.append("; "); } return phoneNumberBuffer.toString(); } Business(); void addEmployee(EmployeeBean anEmployee); EmployeeBean getEmployee(String lastAndFirstName); String getCustomerPhoneNumber(String lastAndFirstName); String getAllCustomerPhoneNumbers(); void addCustomerToPhoneBook(CustomerBean aCustomer);  }
@Test public void testGetAllCustomerPhoneNumbers() { testBusiness.customerPhoneBook.put("Azikiwe, Sarah", sarah.getPhoneNumber()); testBusiness.customerPhoneBook.put("Adams, Joe", joe.getPhoneNumber()); testBusiness.customerPhoneBook.put("Hernandez, Alma", alma.getPhoneNumber()); testBusiness.customerPhoneBook.put("Gustavson, Hannah", hannah.getPhoneNumber()); String phoneBook = testBusiness.getAllCustomerPhoneNumbers(); String expected = "Adams, Joe - (208)888-1900; Azikiwe, Sarah - (208)555-1818; Gustavson, Hannah - (208)888-1599; Hernandez, Alma - (208)888-1598; "; assertEquals(expected, phoneBook); testBusiness.customerPhoneBook.clear(); }