title: IntelliJ cannot resolve Junit for Maven project
body: <p>The closest post I could find on SO is: <a href="https://stackoverflow.com/questions/21339934/why-am-i-getting-cannot-resolve-symbol">Why am I getting &quot;Cannot resolve symbol&quot;?</a></p>
  
  <p>But it didn't help me. :(</p>
  
  <p>Here's my error screenshot:
  <img src="https://i.imgur.com/QDPI7LH.jpg" alt="commercial photography locations"></p>
  
  <p>And I've made sure that my pom.xml is scoped to  and my actual code is also put under test folder.
  Here's my pom.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;groupId&gt;com.fishercoder&lt;/groupId&gt;
      &lt;artifactId&gt;leetcode-algorithms&lt;/artifactId&gt;
      &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                  &lt;configuration&gt;
                      &lt;source&gt;1.7&lt;/source&gt;
                      &lt;target&gt;1.7&lt;/target&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;junit&lt;/groupId&gt;
              &lt;artifactId&gt;junit&lt;/artifactId&gt;
              &lt;version&gt;4.12&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>Also</p>
  
  <pre><code>mvn clean compile
  </code></pre>
  
  <p>runs success.</p>
  
  <p>Here's the result of </p>
  
  <pre><code>mvn test
  </code></pre>
  
  <p>Here:</p>
  
  <pre><code>-------------------------------------------------------
   T E S T S
  -------------------------------------------------------
  Running com.stevesun.AddBinaryTest
  Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.042 sec
  Running com.stevesun.MissingRangesTest
  Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec
  
  Results :
  
  Tests run: 10, Failures: 0, Errors: 0, Skipped: 0
  
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD SUCCESS
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 2.913 s
  [INFO] Finished at: 2017-01-08T09:13:22-08:00
  [INFO] Final Memory: 16M/308M
  [INFO] ------------------------------------------------------------------------
  </code></pre>
  
  <p>I'm guessing it's something funky with my IntelliJ setup?</p>