title: How to increase test coverage in salesforce for external api callout
body: <p>I have an apex class in which I am getting lots of count from external API.</p>
  
  <p>External API returns results in JSON format. For decode this JSON I am using is the following code</p>
  
  <pre><code>ddDashboard obj = (ddDashboard) System.JSON.deserialize(json, ddDashboard.class);
  </code></pre>
  
  <p>Here <code>ddDashboard</code> is my class name.
  Using this I am getting counts and I am directly assigning this count to class variable.</p>
  
  <pre><code>account_total_processed_records_count= obj.account_total_processed_records_count;
  </code></pre>
  
  <p>Here if I write this assignment then <code>test coverage</code> is decreased in APEX test result.</p>
  
  <p>Anybody can help me how can I increase test coverage for above problem OR how can I write test method for assigning count value to class variable from external API call.   </p>