title: Test.loadData with Custom sObject Throws Exception
body: <p>I am loading a CSV file via Static Resourced to test my APEX code. I am using the following code in my test:</p>
  
  <pre><code>List&lt;Territory_Zip_Code__c&gt; territoryData = Test.loadData(Territory_Zip_Code__c.sObjectType, TERRITORY_ZIP_CODES_STATIC_RESOURCE_NAME);
  </code></pre>
  
  <p>The first few lines of the CSV file look like so:</p>
  
  <pre><code>Territory__c,Zip_Code__c
  ABC,123
  DEF,456
  </code></pre>
  
  <p>I am getting the following error:</p>
  
  <blockquote>
    <p>System.StringException: Unknown field: Territory__c</p>
  </blockquote>
  
  <p><code>Territory__c</code> <strong>is a valid API field name</strong> for my custom sObject. </p>
  
  <p>I've also tried adding the sObject name in front of the field name, like <code>My_Territory__c.Territory__c</code> but that didn't work either. </p>
  
  <p>In addition, I tried using the field name, instead of the API name (for example, <code>Territory</code>) but that didn't work either.</p>
  
  <p>There are lots of examples of using Test.loadData with built-in sObjects, such as Account and Contacts, but no examples showing custom sObjects. I'm starting to think this just isn't possible with custom objects.</p>