title: Environment.getExternalStorageDirectory() returns null int AndroidTestCase
body: <p>I have a test case, and using there 
  <code>Environment.getExternalStorageDirectory()</code> call, and it returns null. </p>
  
  <p>I have the "write external storage" permission in app's manifest (and sd cards works fine in app), but it does not work in test case. Why and how to fix it?</p>
  
  <p>Device is SGS3, os version is 4.4.</p>
  
  <p><a href="https://i.stack.imgur.com/u5EyX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/u5EyX.png" alt="Debugger"></a></p>