Hi, Please can someone solve this error and can someone suggest to me how to write a test class for the following code. Because I am getting this error - Methods defined as TestMethod do not support getContent callpublic class sendEmail {public String subject { get; set; }public String body { get; set; } private final Account account; // Create a constructor that populates the Account objectpublic sendEmail() {account = [SELECT Name,(SELECT Contact.Name, Contact.Email FROM Account.Contacts)FROM AccountWHERE Id = :ApexPages.currentPage().getParameters().get('id')];} public Account getAccount() {return account;} public PageReference send() {// Define the emailMessaging.SingleEmailMessage email = new Messaging.SingleEmailMessage(); // Reference the attachment page and pass in the account IDPageReference pdf = Page.attachmentPDF;pdf.getParameters().put('id',(String)account.id);pdf.setRedirect(true); // Take the PDF contentBlob b = pdf.getContent(); // Create the email attachmentMessaging.EmailFileAttachment efa = new Messaging.EmailFileAttachment();efa.setFileName('attachment.pdf');efa.setBody(b); String addresses;if (account.Contacts[0].Email != null) {addresses = account.Contacts[0].Email;// Loop through the whole list of contacts and their emailsfor (Integer i = 1; i < account.Contacts.size(); i++) {if (account.Contacts[i].Email != null) {addresses += ':' + account.Contacts[i].Email;}}} String[] toAddresses = addresses.split(':', 0); // Sets the paramaters of the emailemail.setSubject( subject );email.setToAddresses( toAddresses );email.setPlainTextBody( body ); email.setFileAttachments(new Messaging.EmailFileAttachment[] {efa}); // Sends the emailMessaging.SendEmailResult [] r =Messaging.sendEmail(new Messaging.SingleEmailMessage[] {email});return null;}}