title: java.lang.NoSuchMethodError when running a test in IntelliJ IDEA
body: <p>I get a NoSuchMethodError on AssertJ when I try to execute a unit test. The make step works fine and when navigating to the implementation of assertThat(), it works just fine. </p>
  
  <p>The module dependencies show that I am using org.assertj:assertj-code:1.2.0 as I have defined as compile dependency in my build.gradle (yes, compile and not test). The unit test resides inside the main classpath of my module since it is an integration test, so this is intentional. The iml file contains: </p>
  
  <blockquote>
    <p>&lt;orderEntry type="library" name="Gradle: org.assertj:assertj-core:1.2.0" level="project" /&gt;</p>
  </blockquote>
  
  <p>My example test is:</p>
  
  <pre><code>import org.assertj.core.api.Assertions;
  import org.junit.Test;
  
  public class X {
      @Test
      public void x(){
          Assertions.assertThat(1).isEqualTo(1);
      }
  }
  </code></pre>
  
  <p>and when I execute it, I get:</p>
  
  <blockquote>
    <p>java.lang.NoSuchMethodError:
    org.assertj.core.api.Assertions.assertThat(I)Lorg/assertj/core/api/IntegerAssert;</p>
  </blockquote>
  
  <p>When I look in the run configurations, the classpath is set to the correct module (the module containing AssertJ). </p>
  
  <p>I have tried invalidating caches but that did not help.</p>
  
  <p>I am currently out of ideas (no pun intended).
  Anyone out there who has seen this before? Or have a clue on how to proceed troubleshooting?</p>