title: How to test different permissions of CLLocationManager in test cases
body: <p>I am writing a test to test <code>CoreLocation</code> related function. This function will throw an error if the location services is not enabled.</p>
  
  <pre><code>func someFunction() throws {
      guard CLLocationManager.locationServicesEnabled() throw NSError.init(
              domain: kCLErrorDomain,
              code: CLError.Code.denied.rawValue,
              userInfo: nil)
      }
      ...
  }
  </code></pre>
  
  <p>In my tests, <code>CLLocationManager.locationServicesEnabled()</code> is always <code>true</code>. Is there a way to test the <code>false</code> scenario?</p>