title: No tests found matching Method main in IntelliJ
body: <p>My class is a test class and it has the following structure:</p>
  
  <pre><code>import org.junit.Test;
  import org.junit.runner.RunWith;
  import org.powermock.modules.junit4.PowerMockRunner;
  
  @RunWith(PowerMockRunner.class)
  public class MyClassTest {
  
      public static void main(String[] args) {
          System.out.println("in main");
      }
  
      @Test
      public void maxTest() {
          System.out.println("test");
      }
  
  }
  </code></pre>
  
  <p>If I press the right click on the <code>main</code> method > Run 'main', it throws the following exception: </p>
  
  <pre><code>java.lang.Exception: No tests found matching Method main(MyClassTest) from org.junit.internal.requests.ClassRequest@26aa12dd
      at org.junit.internal.requests.FilterRequest.getRunner(FilterRequest.java:35)
      at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:41)
      at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:212)
      at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:68)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)
  </code></pre>
  
  <p>If I press right click on the class name > Run 'MyClassTest.main()' it works fine printing:</p>
  
  <pre><code>in main
  </code></pre>
  
  <p>If I comment out <code>@RunWith(PowerMockRunner.class)</code>, everything works fine in both cases. </p>
  
  <p>The same problem appears if I use <code>@RunWith(MockitoJUnitRunner.class)</code> instead of <code>@RunWith(PowerMockRunner.class)</code>.</p>
  
  <p>Why is that difference?</p>
  
  <p><strong>Details:</strong></p>
  
  <ul>
  <li>Windows 7</li>
  <li>JUnit 4.12</li>
  <li>PowerMock 1.6.2</li>
  <li>Java 8</li>
  <li>Maven 3</li>
  <li>IntelliJ IDEA 14.1.3</li>
  </ul>