Hi,Here is my code which update the opportunity total when opportunity line item is deleted.OpportunityLineItem oppLineItem = [ select id, Quantity, ListPrice, UnitPrice, ProductCode, OpportunityId from OpportunityLineItem where Id = :opportunityLineItemMap.keySet() ]; Opportunity opp = new Opportunity(); opp.Id = oppLineItem.OpportunityId; Decimal amount = 0 ; if (oppLineItem.ProductCode == 'FedEx' || oppLineItem.ProductCode == 'FedEx1' || oppLineItem.ProductCode == 'FedEx2' || oppLineItem.ProductCode == 'EZShipping' ) { opp.ShippingTotal__c = 0.0; } else if(oppLineItem.ProductCode == 'DiscountAmount') { opp.discountTotal__c = 0.0; } else { opp.SubTotal__c = 0.0; } update opp;I need to write a test method for the above code. Please help me