title: Running simple JUnit tests on Android Studio (IntelliJ) when using a Gradle-based configuration
body: <p>I am using <code>Android Studio/IntelliJ</code> to build on an existing <code>Android</code> project and would like to add some simple <code>JUnit</code> unit tests. What is the right folder to add such tests on?</p>
  
  <p>The android <code>Gradle</code> plug-in defines a directory structure with <code>src/main/java</code> for the main source code and <code>src/instrumentTest/java</code> for <code>Android</code> tests. </p>
  
  <p>Trying to add my JUnit tests in instrumentTest didn't work for me. I can run it as an <code>Android</code> test (that's what that directory seems for) but that's not what I'm looking for - I just want to run a simple <code>JUnit</code> test.
  I tried creating a JUnit run configuration for this Class but that also didn't work - I'm supposing because I'm using a directory that is flagged as <code>Android</code> Test instead of Source.</p>
  
  <p>If I create a new source folder and marki it as such in Project Structure, this will get wiped next time <code>IntelliJ</code> refreshes the project configuration from the gradle build files.</p>
  
  <p>What is the more appropriate way of configuring JUnit tests in an gradle-based android project on <code>IntelliJ</code>? Which directory structure to use for this?</p>