List<NameValuePair> messageParams = new ArrayList<NameValuePair>();
messageParams.add(new BasicNameValuePair("To", "5105551212")); // Replace with a valid phone number
messageParams.add(new BasicNameValuePair("From", "(510) 555-1212")); // Replace with a valid phone
// number in your account
messageParams.add(new BasicNameValuePair("Body", "This is a test message!"));
messageFactory.create(messageParams);
// Search for all available phone numbers
AvailablePhoneNumberList phoneNumbers = mainAccount.getAvailablePhoneNumbers();
List<AvailablePhoneNumber> phoneNumberList = phoneNumbers.getPageData();