Apex Code has built in functionality to call external Web services, such as Amazon Web Services, Facebook, Google, or any publicly available web service. As a result, you will need to have the proper test method code coverage for the related Apex code that makes these callouts. But since the Force.com platform had no control over the external Web service and the impact of making the web service call, test methods can not invoke a 3rd party web service.
This section provides a viable workaround to ensure proper code coverage.
Later on salesforce provide an implementation for the Webservices Callouts called HttpCalloutMock interface to specify the response sent in the respond method, which the Apex runtime calls to send a … Read More