title: Creating a test Class for batch apex
body: <p>I am having truble creating a test class for this particular class. If anyone could provide some code that would implement this I would be very grateful.</p>
  
  <p>Many thanks</p>
  
  <p>Class:</p>
  
  <pre><code>global class TalentIntCustomerBatch implements Database.Batchable&lt;sObject&gt;, Database.AllowsCallouts{
      global final String query;
  
      global TalentIntCustomerBatch(String q){
          query=q;
      }
  
      global Database.QueryLocator start(Database.BatchableContext BC){
          return Database.getQueryLocator(query);
      }
  
      global void execute(Database.BatchableContext BC, List&lt;sObject&gt; scope){     
          for(sObject s : scope){
              Contact c = (Contact)s;
              TalentIntegrationUtils.updateCustomer(c.Id, c.LastName);
          }
      }
  
      global void finish(Database.BatchableContext BC){}
  }
  </code></pre>