title: Serenity Error Due To Element Matcher
body: <p>I am using serenity for my rest assured tests and I am receiving the following error in my test when running through maven:</p>
  
  <pre><code>ERROR net.serenitybdd.core.Serenity - net/bytebuddy/matcher/ElementMatcher
  </code></pre>
  
  <p>Now it works if I use the following code in my class:</p>
  
  <pre><code>@Test
      public void getAllStudents(){
          RestAssured.given()
          .when()
          .get("/list")
          .then()
          .log()
          .all()
          .statusCode(200);
      }
  </code></pre>
  
  <p>However when I changed <code>RestAssured.given()</code> to <code>SerenityRest.given()</code> and re-run the test then I get the error. How can this error be fixed?</p>
  
  <p>Below is the full code from my class:</p>
  
  <pre><code>@RunWith(SerenityRunner.class)
  public class FirstSerenityTest {
  
      @BeforeClass
      public static void init() {
          RestAssured.baseURI="http://localhost:8080/student";
      }
  
  
      @Test
      public void getAllStudents(){
          SerenityRest.given()
          .when()
          .get("/list")
          .then()
          .log()
          .all()
          .statusCode(200);
      }
  </code></pre>
  
  <p>}</p>
  
  <p>Below is my pom.xml file:</p>
  
  <pre><code>&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;StudentApp&lt;/groupId&gt;
    &lt;artifactId&gt;StudentApp&lt;/artifactId&gt;
    &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
  
  &lt;name&gt;StudentApp Serenity BDD&lt;/name&gt;
  
  
      &lt;properties&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
          &lt;serenity.version&gt;1.4.1-rc.6&lt;/serenity.version&gt; &lt;!-- https://bintray.com/serenity/maven/serenity-core/ --&gt;
          &lt;serenity.maven.version&gt;1.4.1-rc.6&lt;/serenity.maven.version&gt;
          &lt;serenity.cucumber.version&gt;1.1.6&lt;/serenity.cucumber.version&gt; &lt;!-- https://bintray.com/serenity/maven/serenity-cucumber/ --&gt;
      &lt;/properties&gt;
  
      &lt;!-- Define the Bintray repos for convenience --&gt;
      &lt;repositories&gt;
          &lt;repository&gt;
              &lt;id&gt;serenity&lt;/id&gt;
              &lt;name&gt;bintray&lt;/name&gt;
              &lt;url&gt;http://dl.bintray.com/serenity/maven&lt;/url&gt;
          &lt;/repository&gt;
      &lt;/repositories&gt;
      &lt;pluginRepositories&gt;
          &lt;pluginRepository&gt;
              &lt;id&gt;serenity&lt;/id&gt;
              &lt;name&gt;bintray-plugins&lt;/name&gt;
              &lt;url&gt;http://dl.bintray.com/serenity/maven&lt;/url&gt;
          &lt;/pluginRepository&gt;
      &lt;/pluginRepositories&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;net.serenity-bdd&lt;/groupId&gt;
              &lt;artifactId&gt;serenity-core&lt;/artifactId&gt;
              &lt;version&gt;${serenity.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;net.serenity-bdd&lt;/groupId&gt;
              &lt;artifactId&gt;serenity-junit&lt;/artifactId&gt;
              &lt;version&gt;${serenity.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;net.serenity-bdd&lt;/groupId&gt;
              &lt;artifactId&gt;serenity-rest-assured&lt;/artifactId&gt;
              &lt;version&gt;${serenity.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;net.serenity-bdd&lt;/groupId&gt;
              &lt;artifactId&gt;serenity-cucumber&lt;/artifactId&gt;
              &lt;version&gt;${serenity.cucumber.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
              &lt;artifactId&gt;slf4j-simple&lt;/artifactId&gt;
              &lt;version&gt;1.6.1&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.codehaus.groovy&lt;/groupId&gt;
              &lt;artifactId&gt;groovy-all&lt;/artifactId&gt;
              &lt;version&gt;1.8.6&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.fasterxml.jackson.core&lt;/groupId&gt;
              &lt;artifactId&gt;jackson-databind&lt;/artifactId&gt;
              &lt;version&gt;2.5.4&lt;/version&gt;
          &lt;/dependency&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;dependency&gt;
              &lt;groupId&gt;com.googlecode.lambdaj&lt;/groupId&gt;
              &lt;artifactId&gt;lambdaj&lt;/artifactId&gt;
              &lt;version&gt;2.3.3&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.assertj&lt;/groupId&gt;
              &lt;artifactId&gt;assertj-core&lt;/artifactId&gt;
              &lt;version&gt;1.7.0&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-enforcer-plugin&lt;/artifactId&gt;
                  &lt;version&gt;1.4&lt;/version&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;enforce&lt;/id&gt;
                          &lt;configuration&gt;
                              &lt;rules&gt;
                                  &lt;requireUpperBoundDeps /&gt;
                              &lt;/rules&gt;
                          &lt;/configuration&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;enforce&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.18&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;skip&gt;true&lt;/skip&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;artifactId&gt;maven-failsafe-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.18&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;includes&gt;
                          &lt;include&gt;**/studentapp/**/*.java&lt;/include&gt;
                      &lt;/includes&gt;
                      &lt;forkCount&gt;4&lt;/forkCount&gt;
                      &lt;reuseForks&gt;true&lt;/reuseForks&gt;
                      &lt;!-- &lt;parallel&gt;methods&lt;/parallel&gt;  --&gt;
                      &lt;!-- &lt;threadCount&gt;10&lt;/threadCount&gt;   --&gt; 
                      &lt;argLine&gt;-Xmx1024m -XX:MaxPermSize=256m&lt;/argLine&gt;
                  &lt;/configuration&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;integration-test&lt;/goal&gt;
                              &lt;goal&gt;verify&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
              &lt;!-- 
       &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.7.0&lt;/version&gt;
          &lt;configuration&gt;
           &lt;source&gt;1.8&lt;/source&gt;
          &lt;target&gt;1.8&lt;/target&gt;
            &lt;verbose&gt;true&lt;/verbose&gt;
            &lt;fork&gt;true&lt;/fork&gt;
            &lt;compilerVersion&gt;1.3&lt;/compilerVersion&gt;
          &lt;/configuration&gt;
        &lt;/plugin&gt; 
        --&gt;           
              &lt;plugin&gt;
                  &lt;groupId&gt;net.serenity-bdd.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;serenity-maven-plugin&lt;/artifactId&gt;
                  &lt;version&gt;${serenity.maven.version}&lt;/version&gt;
                  &lt;dependencies&gt;
                      &lt;dependency&gt;
                          &lt;groupId&gt;net.serenity-bdd&lt;/groupId&gt;
                          &lt;artifactId&gt;serenity-core&lt;/artifactId&gt;
                          &lt;version&gt;${serenity.version}&lt;/version&gt;
                      &lt;/dependency&gt;
                  &lt;/dependencies&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;serenity-reports&lt;/id&gt;
                          &lt;phase&gt;post-integration-test&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;aggregate&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt; 
  &lt;/project&gt;
  </code></pre>
  
  <p>Thanks,</p>