Intellij not recognizing test annotation
<p>IntelliJ is not recognizing my @Test annotation in the IDE. I'm able to run my tests just fine using the IDE and command line. However, I am not able to remove the red, squiggly error line underneath "@Test"</p>

<p>The error message says "'@Test' not applicable to method"...but it should be, especially if the tests run.</p>

<p>Does anyone have a fix for this?</p>

<p>Version: Intellij IDEA 15.0.6</p>

<p>Error Image</p>

<p><a href="https://i.stack.imgur.com/t62Aj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/t62Aj.png" alt="Screenshot"></a></p>

<p>My POM.xml file looks like this:</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;javaForTesters&lt;/groupId&gt;
&lt;artifactId&gt;javaForTesters&lt;/artifactId&gt;
&lt;version&gt;1.0-SNAPSHOT&lt;/version&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;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;version&gt;3.1&lt;/version&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;
</code></pre>

<p></p>