title: How to read a file from src/instrumentTest/resources directory in Android?
body: <p>I have an Android application using the new standard gradle layout:</p>
  
  <pre>
    src/main/java
    src/main/resources
    src/instrumentTest/java
    src/instrumentTest/resources
  </pre>
  
  <p>I have a unit test in <code>src/instrumentTest/java/com/example/MyUnitTest.java</code> that reads a file located in <code> src/instrumentTest/resources/testfile.json</code></p>
  
  <ul>
  <li>First question: Is it the right place for placing the testing files?</li>
  <li>Second question: How can I read that file in a String?</li>
  </ul>
  
  <p>I have tried these two ways for reading the file in the unit test with no success (it cannot find the file):</p>
  
  <pre>
  String myJson = new Scanner(new File("testfile.json"),"UTF-8").useDelimiter("\\A").next();
  
  String myJson = new Scanner(new File("resources/testfile.json"),"UTF-8").useDelimiter("\\A").next();
  </pre>
  
  <p>Cheers!</p>