function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Soumya Srivastava 1Soumya Srivastava 1 

Getting to many callouts 11 on writing a test class using mock service class.

 public ecEuropaEuTaxudViesServicesCheckva.checkVatResponse_element checkVat(String countryCode,String vatNumber)
        {
            ecEuropaEuTaxudViesServicesCheckva.checkVat_element request_x = new ecEuropaEuTaxudViesServicesCheckva.checkVat_element();
            request_x.countryCode = countryCode;
            request_x.vatNumber = vatNumber;
            ecEuropaEuTaxudViesServicesCheckva.checkVatResponse_element response_x;
            Map<String, ecEuropaEuTaxudViesServicesCheckva.checkVatResponse_element> response_map_x = new Map<String, ecEuropaEuTaxudViesServicesCheckva.checkVatResponse_element>();
            response_map_x.put('response_x', response_x);
            WebServiceCallout.invoke(
                this,
                request_x,
                response_map_x,
                new String[]{endpoint_x,
                    '',
                    'urn:ec.europa.eu:taxud:vies:services:checkVat:types',
                    'checkVat',
                    'urn:ec.europa.eu:taxud:vies:services:checkVat:types',
                    'checkVatResponse',
                    'ecEuropaEuTaxudViesServicesCheckva.checkVatResponse_element'}
            );
            response_x = response_map_x.get('response_x');
            return response_x;
        }

I am unable to debug the error coming with my test class for the below method which is there. Can anyone ehlp on this ASAP.
Raj VakatiRaj Vakati
Are you calling it from the trigger ? give me complete test class to see the issue ...? 

Insted of insert recronds in test classes one by one .. insted them in bulk