5 Replies Latest reply on Sep 30, 2014 1:49 PM by Ove Ranheim

    Arquillian + WARP REST extension => RestContextNotFoundException

    Michal Giershu Newbie

      hello,

       

      I'm trying to test my RESTful web services on wildfly 8, using Arquillian and WARP REST extension (https://github.com/arquillian/arquillian-extension-rest/tree/master/warp-rest

      We are using JAX RS API to create services and the application server provides RESTEasy framework.

       

      I'm following an example test from arquillian-extension-rest/warp-rest/ftest/ftest-jaxrs-2.0 at master · arquillian/arquillian-extension-rest · GitHub

      However I got the problem when I inject RestContext as an @ArquillianResource in the Inspection

       

      My logs:

      java.lang.RuntimeException: Could not lookup value for field org.jboss.arquillian.extension.rest.warp.api.RestContext somepackage.ProjectsResourceTest$2.restContext
          at org.jboss.arquillian.test.impl.enricher.resource.ArquillianResourceTestEnricher.enrich(ArquillianResourceTestEnricher.java:61)
          at org.jboss.arquillian.test.impl.TestInstanceEnricher.enrich(TestInstanceEnricher.java:52)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:606)
          at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
          at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
          at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
          at org.jboss.arquillian.warp.impl.server.test.LifecycleTestEnrichmentWatcher.rememberFieldValues(LifecycleTestEnrichmentWatcher.java:52)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:606)
          at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
          at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
          at org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:102)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:606)
          at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
          at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
          at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:84)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:606)
          at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
          at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
          at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:65)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:606)
          at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
          at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
          at org.jboss.arquillian.warp.impl.server.test.LifecycleTestClassExecutor.beforeTest(LifecycleTestClassExecutor.java:63)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:606)
          at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
          at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
          at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
          at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
          at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
          at org.jboss.arquillian.warp.impl.server.test.LifecycleTestDriver.executeTest(LifecycleTestDriver.java:89)
          at org.jboss.arquillian.warp.impl.server.test.LifecycleTestDriver.fireTest(LifecycleTestDriver.java:73)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:606)
          at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
          at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
          at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
          at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
          at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
          at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
          at org.jboss.arquillian.warp.impl.server.lifecycle.LifecycleManagerImpl.fireEvent(LifecycleManagerImpl.java:41)
          at org.jboss.arquillian.warp.impl.server.execution.WarpLifecycle.execute(WarpLifecycle.java:75)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:606)
          at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
          at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
          at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
          at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
          at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
          at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
          at org.jboss.arquillian.warp.impl.server.execution.WarpRequestProcessor.processWarpRequest(WarpRequestProcessor.java:63)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:606)
          at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
          at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
          at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
          at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
          at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
          at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
          at org.jboss.arquillian.warp.impl.server.execution.HttpRequestProcessor.processHttpRequest(HttpRequestProcessor.java:70)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:606)
          at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
          at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
          at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
          at org.jboss.arquillian.warp.impl.server.request.RequestContextHandler.handleRequestContext(RequestContextHandler.java:90)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:606)
          at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
          at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
          at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
          at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
          at org.jboss.arquillian.warp.impl.server.execution.WarpFilter.doFilterWarp(WarpFilter.java:151)
          at org.jboss.arquillian.warp.impl.server.execution.WarpFilter.doFilterHttp(WarpFilter.java:120)
          at org.jboss.arquillian.warp.impl.server.execution.WarpFilter.doFilter(WarpFilter.java:93)
          at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:56)
          at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132)
          at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:85)
          at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61)
          at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
          at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
          at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)
          at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:113)
          at io.undertow.security.handlers.AuthenticationCallHandler.handleRequest(AuthenticationCallHandler.java:52)
          at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45)
          at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:61)
          at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70)
          at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76)
          at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)
          at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
          at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)
          at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25)
          at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:240)
          at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:227)
          at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:73)
          at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:146)
          at io.undertow.server.Connectors.executeRootHandler(Connectors.java:168)
          at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:687)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
          at java.lang.Thread.run(Thread.java:744)
      Caused by: org.jboss.arquillian.extension.rest.warp.impl.provider.RestContextNotFoundException: The instance of RestContext can not be lookup. Please check whether you had correctly configured interceptors
          at org.jboss.arquillian.extension.rest.warp.impl.provider.RestContextProvider.lookup(RestContextProvider.java:66)
          at org.jboss.arquillian.test.impl.enricher.resource.ArquillianResourceTestEnricher.lookup(ArquillianResourceTestEnricher.java:112)
          at org.jboss.arquillian.test.impl.enricher.resource.ArquillianResourceTestEnricher.enrich(ArquillianResourceTestEnricher.java:57)
          ... 127 more
      
      
      
      

       

      My test looks as follows:

      import static org.fest.assertions.api.Assertions.assertThat;
      
      import java.net.URL;
      
      import javax.inject.Inject;
      import javax.servlet.http.HttpServletRequest;
      import javax.ws.rs.core.Response;
      
      import org.jboss.arquillian.container.test.api.RunAsClient;
      import org.jboss.arquillian.extension.rest.warp.api.RestContext;
      import org.jboss.arquillian.test.api.ArquillianResource;
      import org.jboss.arquillian.warp.Activity;
      import org.jboss.arquillian.warp.Inspection;
      import org.jboss.arquillian.warp.Warp;
      import org.jboss.arquillian.warp.WarpTest;
      import org.jboss.arquillian.warp.servlet.AfterServlet;
      import org.jboss.arquillian.warp.servlet.BeforeServlet;
      import org.jboss.resteasy.client.jaxrs.ResteasyClient;
      import org.jboss.resteasy.client.jaxrs.ResteasyClientBuilder;
      import org.jboss.resteasy.client.jaxrs.ResteasyWebTarget;
      import org.jboss.resteasy.plugins.providers.RegisterBuiltin;
      import org.jboss.resteasy.spi.ResteasyProviderFactory;
      import org.junit.Before;
      import org.junit.BeforeClass;
      import org.junit.Test;
      
      
      @WarpTest
      @RunWith(Arquillian.class)
      public class ProjectsResourceTest {
      
          @ArquillianResource
          private URL contextPath;
      
          private ProjectsResource projectsResource;
      
          protected final static String[] MAVEN_DEPENDECIES = new String[]{
                  "org.slf4j:slf4j-api",
                  "com.mysema.querydsl:querydsl-jpa",
                  "ma.glasnost.orika:orika-core",
                  "org.quartz-scheduler:quartz",
                  "org.apache.deltaspike.core:deltaspike-core-api",
                  "org.apache.deltaspike.core:deltaspike-core-impl",
                  "org.apache.deltaspike.cdictrl:deltaspike-cdictrl-api",
                  "org.apache.deltaspike.cdictrl:deltaspike-cdictrl-weld",
                  "org.apache.commons:commons-lang3",
                  "org.apache.commons:commons-collections4",
                  "com.google.guava:guava",
                  //test dependencies
                  "org.easytesting:fest-assert-core",
                  "com.googlecode.catch-exception:catch-exception"
          };
      
          @Deployment
          @OverProtocol("Servlet 3.0")
          public static WebArchive createDeployment() {
      
              PomEquippedResolveStage pom = Maven.resolver().loadPomFromFile("pom.xml");
              File[] dependencies = pom.resolve(MAVEN_DEPENDECIES).withTransitivity().asFile();
           
              WebArchive webArchive = ShrinkWrap.create(WebArchive.class)
                      .addPackages(true, "private packages")
                      .addAsResource("test-persistence.xml", "META-INF/persistence.xml")
                      .addAsResource("beans.xml", "META-INF/beans.xml")
                      .addAsResource("META-INF/services/javax.enterprise.inject.spi.Extension",
                              "META-INF/services/javax.enterprise.inject.spi.Extension")
                      .addAsLibraries(dependencies);
      
              return webArchive;
          }
      
      
          @BeforeClass
          public static void setUpClass() {
              // initializes the rest easy client framework
              RegisterBuiltin.register(ResteasyProviderFactory.getInstance());
          }
      
          @Before
          public void setUp() {
              ResteasyClient client = new ResteasyClientBuilder().build();
              ResteasyWebTarget target = client.target(contextPath + "rest");
              projectsResource = target.proxy(ProjectsResource.class);
          }
      
          @Test
          @RunAsClient
          public void shouldReturnEmptyList() {
              // Given
      
              Warp.initiate(new Activity() {
      
                  @Override
                  public void perform() {
                      // when
                      Response response = projectsResource.getProject(1l);
                      // then
                      assertThat(response.getStatus()).isEqualTo(Response.Status.OK.getStatusCode());
                  }
              }).inspect(new Inspection() {
      
                  private static final long serialVersionUID = 1L;
      
                  @Inject
                  ProjectService projectService;
      
                  @ArquillianResource
                  private RestContext restContext;
      
                  @BeforeServlet
                  public void before() {
                      Project project = new Project();
                      project.setName("sample");
                      projectService.createProject(project);
                  }
      
                  @AfterServlet
                  public void after() {
                      // remove all projects                ;
                  }
              });
          }
      }
      
      
      
      
      

       

      I suppose that something is wrong with the container or unregistered WARP REST interceptors. But right now I have no clue how can I get it better.

      If someone has encountered this kind of issue, please give me any suggestions.

        • 1. Re: Arquillian + WARP REST extension => RestContextNotFoundException
          Michal Matloka Newbie

          I have exactly the same problem. Have you found any answer to this?

          • 2. Re: Arquillian + WARP REST extension => RestContextNotFoundException
            Lukáš Fryč Master

            Hey guys,

             

            basically this happens because we expect the context to be stored as a request attribute WARP_REST_ATTRIBUTE:

            https://github.com/arquillian/arquillian-extension-rest/blob/master/warp-rest/impl/impl-base/src/main/java/org/jboss/arquillian/extension/rest/warp/impl/provider/RestContextProvider.java#L62

             

            By searching through the extension codebase I have found this attribute is set by one of the implementation-specific providers:

            https://gist.github.com/lfryc/b206643c419e54803941

             

            I guess you can be missing some JARs from classpath (check whether you have Warp API+Impl, Warp REST API + implementation(CXF, RestEasy, Jersey).

            Otherwise let's put breakpoint into one of the *ContextBuilders (in the gist above) and see whether they are hit or not.

             

            It would help to send us a classpath and possibly also Arquillian debug log (mvn ... -Darquillian.debug=true)

            • 3. Re: Arquillian + WARP REST extension => RestContextNotFoundException
              Michal Matloka Newbie

              Thx Lukas. My problem was in activity part - wrong url for client request was used.

              • 5. Re: Arquillian + WARP REST extension => RestContextNotFoundException
                Ove Ranheim Novice

                I'm getting the same error when upgrading RESTEasy from 3.0.6 to 3.0.7+ and I am using: Arquillian 1.1.5, Arqullian REST 1.0.0.Alpha3, Arquillian Warp 1.0.0.Alpha7 and Tomcat Embedded 1.0.0.CR7.

                 

                Ove

                 

                java.lang.RuntimeException: Could not lookup value for field private org.jboss.arquillian.extension.rest.warp.api.RestContext com.parts.test.warp.WarpRestTest$1.restContext
                  at org.jboss.arquillian.test.impl.enricher.resource.ArquillianResourceTestEnricher.enrich(ArquillianResourceTestEnricher.java:61)
                  at org.jboss.arquillian.test.impl.TestInstanceEnricher.enrich(TestInstanceEnricher.java:52)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                  at java.lang.reflect.Method.invoke(Method.java:483)
                  at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
                  at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
                  at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
                  at org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:102)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                  at java.lang.reflect.Method.invoke(Method.java:483)
                  at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
                  at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
                  at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:84)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                  at java.lang.reflect.Method.invoke(Method.java:483)
                  at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
                  at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
                  at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:65)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                  at java.lang.reflect.Method.invoke(Method.java:483)
                  at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
                  at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
                  at org.jboss.arquillian.warp.impl.server.test.LifecycleTestClassExecutor.beforeTest(LifecycleTestClassExecutor.java:63)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                  at java.lang.reflect.Method.invoke(Method.java:483)
                  at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
                  at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
                  at org.jboss.arquillian.warp.impl.server.test.LifecycleTestEnrichmentWatcher.rememberFieldValues(LifecycleTestEnrichmentWatcher.java:52)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                  at java.lang.reflect.Method.invoke(Method.java:483)
                  at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
                  at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
                  at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145)
                  at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:116)
                  at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
                  at org.jboss.arquillian.warp.impl.server.test.LifecycleTestDriver.executeTest(LifecycleTestDriver.java:89)
                  at org.jboss.arquillian.warp.impl.server.test.LifecycleTestDriver.fireTest(LifecycleTestDriver.java:73)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                  at java.lang.reflect.Method.invoke(Method.java:483)
                  at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
                  at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
                  at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
                  at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145)
                  at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:116)
                  at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
                  at org.jboss.arquillian.warp.impl.server.lifecycle.LifecycleManagerImpl.fireEvent(LifecycleManagerImpl.java:41)
                  at org.jboss.arquillian.warp.impl.server.execution.WarpLifecycle.execute(WarpLifecycle.java:79)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                  at java.lang.reflect.Method.invoke(Method.java:483)
                  at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
                  at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
                  at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
                  at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145)
                  at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:116)
                  at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
                  at org.jboss.arquillian.warp.impl.server.execution.WarpRequestProcessor.processWarpRequest(WarpRequestProcessor.java:63)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                  at java.lang.reflect.Method.invoke(Method.java:483)
                  at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
                  at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
                  at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
                  at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145)
                  at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:116)
                  at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
                  at org.jboss.arquillian.warp.impl.server.execution.HttpRequestProcessor.processHttpRequest(HttpRequestProcessor.java:70)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                  at java.lang.reflect.Method.invoke(Method.java:483)
                  at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
                  at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
                  at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
                  at org.jboss.arquillian.warp.impl.server.request.RequestContextHandler.handleRequestContext(RequestContextHandler.java:90)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
                  at java.lang.reflect.Method.invoke(Method.java:483)
                  at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
                  at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
                  at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145)
                  at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:116)
                  at org.jboss.arquillian.warp.impl.server.execution.WarpFilter.doFilterWarp(WarpFilter.java:151)
                  at org.jboss.arquillian.warp.impl.server.execution.WarpFilter.doFilterHttp(WarpFilter.java:120)
                  at org.jboss.arquillian.warp.impl.server.execution.WarpFilter.doFilter(WarpFilter.java:93)
                  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
                  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
                  at org.apache.deltaspike.servlet.impl.event.EventBridgeFilter.doFilter(EventBridgeFilter.java:59)
                  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
                  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
                  at org.apache.deltaspike.servlet.impl.produce.RequestResponseHolderFilter.doFilter(RequestResponseHolderFilter.java:63)
                  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
                  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
                  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
                  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
                  at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
                  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
                  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
                  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
                  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
                  at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
                  at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
                  at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:315)
                  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
                  at java.lang.Thread.run(Thread.java:745)
                Caused by: org.jboss.arquillian.extension.rest.warp.impl.provider.RestContextNotFoundException: The instance of RestContext can not be lookup. Please check whether you had correctly configured interceptors
                  at org.jboss.arquillian.extension.rest.warp.impl.provider.RestContextProvider.lookup(RestContextProvider.java:66)
                  at org.jboss.arquillian.test.impl.enricher.resource.ArquillianResourceTestEnricher.lookup(ArquillianResourceTestEnricher.java:112)
                  at org.jboss.arquillian.test.impl.enricher.resource.ArquillianResourceTestEnricher.enrich(ArquillianResourceTestEnricher.java:57)
                  ... 122 more