title: Apex Class - System.NullPointerException: Attempt to de-reference a null object
body: <p>I am new to classes and triggers. I'm attempting to run a simple query for a custom object in Salesforce but each time I try to move my class (along with the test) over to production, I get "System.NullPointerException: Attempt to de-reference a null object Stack Trace: Class.CloneListTest.testCloneListControllerFive: line 150, column 1". I've tried following suggestions I found on Google but nothing seems to work (probably because I am doing something wrong.)</p>
  
  <p><strong>Class:</strong> <br></p>
  
  <pre><code>   public class FindPT {
        @AuraEnabled
           public static List&lt;PT_Tracker__c&gt; getAllAccounts(){
            return [Select Id,Name ,Running_Total_Warning__c,Eligible__c,Employee__c,Running_Total__c, Accrual_Rate__c,Running_Balance_of_Accrued_Hours__c,Running_Balance_of_Approved_Hours__c from PT_Tracker__c Where Employee__c = :UserInfo.getUserID()] ; 
           }
      }
  </code></pre>
  
  <p><strong>Test:</strong><br></p>
  
  <pre><code>@isTest public class TestFindPT1 {
  static testMethod void testAccountList ()
  { List&lt;PT_Tracker__c&gt; pt_trackers = new List&lt;PT_Tracker__c&gt;(); 
   for (Integer count = 0; count &lt; 50; count++) 
   { pt_trackers.add(new PT_Tracker__c (Employee__c = '00561000003gg9K')); } 
   insert pt_trackers;
  
   Test.startTest(); 
  
    try{
   FindPT.getAllAccounts();       
  }
      catch(Exception e){
  }
  
   Test.stopTest();
  
   PT_Tracker__c ACC = [select employee__c from PT_Tracker__c LIMIT 1]; 
   System.assertEquals ( String.valueOf(ACC.employee__c) , '00561000003gg9K'); 
  
  }
  }
  </code></pre>
  
  <p>Any help you can provide would be greatly appreciated. Thanks!</p>