I am writing a test class. When i run my test class i am getting an error
System.DmlException: Insert failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Required fields are missing: [Name]: [Name]
Class.TestCVFC_productToInstalledItems.TestCVFC_productToInstalledItems: line 20, column 1
but my code contains the name field
Opportunity opp = new Opportunity();
opp.Name = 'OppName';
opp.Accountid = ac.id;
opp.Copy_Account_BA_to_SA__c = true;
opp.Street__c = 'OppAddress';
opp.StageName = 'Qualification';
opp.CloseDate = date.today();
insert opp;
insert opp is on the line no 20.