public class AccountHandler {
// Method to update account information
public static void updateAccountName(List<Account> accountsToUpdate) {
for (Account acc : accountsToUpdate) {
acc.Name = acc.Name + ' - Updated';
}
update accountsToUpdate;
}
}
cHVibGljIGNsYXNzIEFjY291bnRIYW5kbGVyIHsKICAgIC8vIE1ldGhvZCB0byB1cGRhdGUgYWNjb3VudCBpbmZvcm1hdGlvbgogICAgcHVibGljIHN0YXRpYyB2b2lkIHVwZGF0ZUFjY291bnROYW1lKExpc3Q8QWNjb3VudD4gYWNjb3VudHNUb1VwZGF0ZSkgewogICAgICAgIGZvciAoQWNjb3VudCBhY2MgOiBhY2NvdW50c1RvVXBkYXRlKSB7CiAgICAgICAgICAgIGFjYy5OYW1lID0gYWNjLk5hbWUgKyAnIC0gVXBkYXRlZCc7CiAgICAgICAgfQogICAgICAgIHVwZGF0ZSBhY2NvdW50c1RvVXBkYXRlOwogICAgfQp9