title: android.util.Patterns Unit test returns NullPointerException
body: <p>I'm starting to work with unit tests in android 
  I have trying to test a method that uses:</p>
  
  <pre><code>android.util.Patterns.EMAIL_ADDRESS.matcher(validEmail).matches()
  </code></pre>
  
  <p>it should return true as I added this in my build.gradle</p>
  
  <pre><code>testOptions { 
      unitTests {
          returnDefaultValues = true
      }
  } 
  </code></pre>
  
  <p>Still the test throws a NullPointerException. </p>
  
  <p>I have two questions: 
  1- How do I fix this? 
  2- Should I reconsider my design and remove the android dependency to a mock object. </p>
  
  <pre><code>// @ LoginPresenterTest
  @Test
  public void clickOnLogin_loginSuccess(){
      loginPresenter.login(validEmail, validPassword);
      verify(loginView).setLoginButton(false);
  }
  // LoginPresenter
  public void login(String email, String password) {
  
      loginView.setLoginButton(false);
      if(!isValid(email, password)){
          loginView.setLoginButton(true);
          return;
      }
  }
  // Validation
  public static boolean isEmailValid(String email){
      return !(email.isEmpty() || !android.util.Patterns.EMAIL_ADDRESS.matcher(email).matches());
  }
  </code></pre>
  
  <p>When android.utills is commented their will be no exception.</p>