title: Maven with automated testing using TestNG, JSFUnit 2 and Arquillian
body: <p>im currently trying to make a JSFUnit-Test with Arquillian and TestNG, but the JSFServerSession and JSFClientSession-object is NULL. Is there a working EXAMPLE for having JSFUnit and TestNG? Or is something else wrong here?</p>
  
  <p>My testing-class:</p>
  
  <pre class="lang-java prettyprint-override"><code>package my.beautiful.tests;
  
  import java.io.File;
  import java.io.IOException;
  import java.net.URL;
  
  import javax.faces.component.UIComponent;
  
  import org.jboss.arquillian.container.test.api.Deployment;
  import org.jboss.arquillian.test.api.ArquillianResource;
  import org.jboss.arquillian.testng.Arquillian;
  import org.jboss.jsfunit.api.InitialPage;
  import org.jboss.jsfunit.jsfsession.JSFClientSession;
  import org.jboss.jsfunit.jsfsession.JSFServerSession;
  import org.jboss.shrinkwrap.api.ShrinkWrap;
  import org.jboss.shrinkwrap.api.spec.WebArchive;
  import org.testng.AssertJUnit;
  import org.testng.annotations.Test;
  
  public class JSFUnitTestExample /* Arquillian needs this, not TestNG */extends Arquillian {
  
      @ArquillianResource URL context;
  
      @Deployment
      public static WebArchive createDeployment() {
          return ShrinkWrap.create( WebArchive.class, "jsfunit_test.war" ).addClass( JSFUnitBean.class )
                  .addAsWebInfResource( new File( "src/main/webapp/WEB-INF", "faces-config.xml" ), "faces-config.xml" )
                  .addAsWebInfResource( new File( "src/main/webapp/WEB-INF", "beans.xml" ), "beans.xml" )
                  .setWebXML( new File( "src/main/webapp/WEB-INF", "web.xml" ) )
                  .addAsWebResource( new File( "src/main/webapp", "index.xhtml" ) );
      }
  
      @Test(dataProvider = Arquillian.ARQUILLIAN_DATA_PROVIDER, description = "Testet, ob bei dem Klick auf den Button der Text 'Hello World' erscheint und das Bean somit richtig angesprochen wird.")
      @InitialPage("/index.xhtml")
      public void testInitialPage( JSFServerSession server, JSFClientSession client ) throws IOException {
          AssertJUnit.assertNotNull( server );
          AssertJUnit.assertNotNull( client );
  
          AssertJUnit.assertEquals( "/index.xhtml", server.getCurrentViewID() );
          client.click( "submitButton" );
  
          UIComponent result = server.findComponent( "result" );
          AssertJUnit.assertTrue( result.isRendered() );
  
          AssertJUnit.assertEquals( "Hello World", server.getManagedBeanValue( "#{jSFUnitBean.message}" ) );
          AssertJUnit.assertEquals( "/index.xhtml", server.getCurrentViewID() );
      }
  }
  </code></pre>
  
  <p>My pom.xml</p>
  
  <pre class="lang-xml prettyprint-override"><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/maven-v4_0_0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;groupId&gt;my.beautiful.tests&lt;/groupId&gt;
      &lt;artifactId&gt;jsfunit-example&lt;/artifactId&gt;
      &lt;version&gt;1.0&lt;/version&gt;
  
      &lt;packaging&gt;war&lt;/packaging&gt;
  
      &lt;name&gt;Tests :: JSFUnit-Tests with Arquillian&lt;/name&gt;
  
      &lt;properties&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;      
          &lt;arquillian.debug&gt;true&lt;/arquillian.debug&gt; &lt;!-- tells arquillian to be verbose --&gt;
          &lt;openejb.arquillian.debug&gt;true&lt;/openejb.arquillian.debug&gt; &lt;!-- tells arquillian to be verbose --&gt;
  
          &lt;!-- versions --&gt;
          &lt;tomee.version&gt;1.5.1&lt;/tomee.version&gt;
          &lt;arquillian.version&gt;1.0.2.Final&lt;/arquillian.version&gt;
          &lt;myfaced.version&gt;2.1.8&lt;/myfaced.version&gt;
          &lt;jsfunit.version&gt;2.0.0.Beta2&lt;/jsfunit.version&gt;
      &lt;/properties&gt;
  
      &lt;build&gt;
          &lt;finalName&gt;jsfunit_test&lt;/finalName&gt;
          &lt;plugins&gt;
              &lt;!-- its Java 7 (1.7) --&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;2.5.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;!-- /its Java 7 (1.7) --&gt;
              &lt;!-- &lt;special options for TESTING&gt; --&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.12.4&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;includes&gt;
                          &lt;include&gt;**/*.java&lt;/include&gt;&lt;!-- dont just run *Test.java-files, which is default for surefire --&gt;
                      &lt;/includes&gt;
                      &lt;!-- for Arquillian --&gt;
                      &lt;parallel&gt;none&lt;/parallel&gt; &lt;!-- for NOT spawning servers with the same port/port-colision --&gt;
                      &lt;threadCount&gt;1&lt;/threadCount&gt; &lt;!-- for NOT spawning servers with the same port/port-colision --&gt;
                      &lt;systemPropertyVariables&gt;
                          &lt;arquillian.launch&gt;tomee-embedded&lt;/arquillian.launch&gt;
                      &lt;/systemPropertyVariables&gt;
                      &lt;!-- /for Arquillian --&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;!-- &lt;/special options for TESTING&gt; --&gt;
              &lt;!-- &lt;for having better IDE-Support&gt; --&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-eclipse-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.9&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;downloadSources&gt;true&lt;/downloadSources&gt;
                      &lt;downloadJavadocs&gt;true&lt;/downloadJavadocs&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;!-- &lt;/for having better IDE-Support&gt; --&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
      &lt;dependencies&gt;
          &lt;!-- javaEE (tomEE) --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.openejb&lt;/groupId&gt;
              &lt;artifactId&gt;javaee-api&lt;/artifactId&gt;
              &lt;version&gt;6.0-4&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;!-- /javaEE (tomEE) --&gt;
  
          &lt;!-- javax.faces --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.myfaces.core&lt;/groupId&gt;
              &lt;artifactId&gt;myfaces-api&lt;/artifactId&gt;
              &lt;version&gt;2.1.8&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.myfaces.core&lt;/groupId&gt;
              &lt;artifactId&gt;myfaces-impl&lt;/artifactId&gt;
              &lt;version&gt;2.1.8&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;!-- /javax.faces --&gt;
  
          &lt;!-- jsfunit --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.jboss.jsfunit&lt;/groupId&gt;
              &lt;artifactId&gt;jboss-jsfunit-core&lt;/artifactId&gt;
              &lt;version&gt;2.0.0.Beta2&lt;/version&gt;
              &lt;scope&gt;compile&lt;/scope&gt;
          &lt;/dependency&gt;
           &lt;dependency&gt;
               &lt;groupId&gt;org.jboss.jsfunit&lt;/groupId&gt;
               &lt;artifactId&gt;jsfunit-arquillian&lt;/artifactId&gt;
              &lt;version&gt;2.0.0.Beta2&lt;/version&gt;
               &lt;scope&gt;test&lt;/scope&gt;
           &lt;/dependency&gt;
          &lt;!-- /jsfunit --&gt;
  
          &lt;!-- Arquilian --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.jboss.arquillian.testng&lt;/groupId&gt;
              &lt;artifactId&gt;arquillian-testng-container&lt;/artifactId&gt;&lt;!-- if JUnit is used, change this container to corresponding one --&gt;
              &lt;version&gt;1.0.2.Final&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;!-- Arquilian Adapter --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.openejb&lt;/groupId&gt;
              &lt;artifactId&gt;arquillian-tomee-embedded&lt;/artifactId&gt;
              &lt;version&gt;1.5.1&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;!-- /Arquilian Adapter --&gt;
          &lt;!-- ShrinkWrap - Dependency for Arquillian --&gt;
           &lt;dependency&gt;
               &lt;groupId&gt;org.jboss.shrinkwrap&lt;/groupId&gt;
               &lt;artifactId&gt;shrinkwrap-api&lt;/artifactId&gt;
               &lt;version&gt;1.1.1-alpha-2&lt;/version&gt;
               &lt;scope&gt;test&lt;/scope&gt;
           &lt;/dependency&gt;
           &lt;dependency&gt;
               &lt;groupId&gt;org.jboss.shrinkwrap.resolver&lt;/groupId&gt;
               &lt;artifactId&gt;shrinkwrap-resolver-api-maven&lt;/artifactId&gt;
               &lt;version&gt;2.0.0-alpha-6&lt;/version&gt;
               &lt;scope&gt;test&lt;/scope&gt;
           &lt;/dependency&gt;
           &lt;dependency&gt;
               &lt;groupId&gt;org.jboss.shrinkwrap.resolver&lt;/groupId&gt;
               &lt;artifactId&gt;shrinkwrap-resolver-impl-maven&lt;/artifactId&gt;
               &lt;version&gt;2.0.0-alpha-6&lt;/version&gt;
               &lt;scope&gt;test&lt;/scope&gt;
           &lt;/dependency&gt;
           &lt;dependency&gt;
               &lt;groupId&gt;org.jboss.shrinkwrap.descriptors&lt;/groupId&gt;
               &lt;artifactId&gt;shrinkwrap-descriptors-impl&lt;/artifactId&gt;
               &lt;version&gt;1.1.0-beta-1&lt;/version&gt;
               &lt;scope&gt;test&lt;/scope&gt;
           &lt;/dependency&gt;
           &lt;!-- /ShrinkWrap - Dependency for Arquillian --&gt;
          &lt;!-- /Arquilian --&gt;
  
          &lt;!-- TestNG --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.testng&lt;/groupId&gt;
              &lt;artifactId&gt;testng&lt;/artifactId&gt;
              &lt;version&gt;6.8&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;!-- /TestNG --&gt;
      &lt;/dependencies&gt;
  
      &lt;repositories&gt;
          &lt;!-- jsfunit --&gt;
          &lt;repository&gt;
              &lt;id&gt;JBoss Dev&lt;/id&gt;
              &lt;url&gt;http://repository.jboss.org/nexus/content/groups/public/&lt;/url&gt;
               &lt;releases&gt;
                   &lt;enabled&gt;true&lt;/enabled&gt;
                   &lt;updatePolicy&gt;never&lt;/updatePolicy&gt;
               &lt;/releases&gt;
               &lt;snapshots&gt;
                   &lt;enabled&gt;true&lt;/enabled&gt;
                   &lt;updatePolicy&gt;never&lt;/updatePolicy&gt;
               &lt;/snapshots&gt;
          &lt;/repository&gt;
          &lt;!-- /jsfunit --&gt;
  
          &lt;repository&gt;
              &lt;id&gt;apache-m2-snapshot&lt;/id&gt;
              &lt;name&gt;Apache Snapshot Repository&lt;/name&gt;
              &lt;url&gt;http://repository.apache.org/snapshots&lt;/url&gt;
          &lt;/repository&gt;
      &lt;/repositories&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>Edit: here my TestNG-result:
  test</p>
  
  <pre><code>InitialPage (null, null)
  "java.lang.AssertionError: at my.beatiful.tests.JSFUnitTestExample.testInitialPage(JSFUnitTestExample.java:35) at org.jboss.arquillian.testng.Arquillian$2.invoke(Arquillian.java:167) at org.jboss.arquillian.container.test.impl.execution.LocalTestExecuter.execute(LocalTestExecuter.java:60) 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.container.test.impl.client.protocol.local.LocalContainerMethodExecutor.invoke(LocalContainerMethodExecutor.java:50) at org.jboss.arquillian.container.test.impl.execution.RemoteTestExecuter.execute(RemoteTestExecuter.java:120) 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.container.test.impl.execution.ClientTestExecuter.execute(ClientTestExecuter.java:57) 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.container.test.impl.client.ContainerEventController.createContext(ContainerEventController.java:142) at org.jboss.arquillian.container.test.impl.client.ContainerEventController.createTestContext(ContainerEventController.java:129) 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:89) 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:75) 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:60) 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.test.impl.EventTestRunnerAdaptor.test(EventTestRunnerAdaptor.java:111) at org.jboss.arquillian.testng.Arquillian.run(Arquillian.java:158) at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:77) at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:110) at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:106) at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189) at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165) at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75) ... Removed 63 stack frames
  
  java.lang.AssertionError: at org.testng.AssertJUnit.fail(AssertJUnit.java:59) at org.testng.AssertJUnit.assertTrue(AssertJUnit.java:24) at org.testng.AssertJUnit.assertNotNull(AssertJUnit.java:267) at org.testng.AssertJUnit.assertNotNull(AssertJUnit.java:259) at my.beatiful.tests.JSFUnitTestExample.testInitialPage(JSFUnitTestExample.java:35) 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:601) at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80) at org.testng.internal.MethodInvocationHelper$1.runTestMethod(MethodInvocationHelper.java:182) at org.jboss.arquillian.testng.Arquillian$2.invoke(Arquillian.java:167) at org.jboss.arquillian.container.test.impl.execution.LocalTestExecuter.execute(LocalTestExecuter.java:60) 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:601) 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.container.test.impl.client.protocol.local.LocalContainerMethodExecutor.invoke(LocalContainerMethodExecutor.java:50) at org.jboss.arquillian.container.test.impl.execution.RemoteTestExecuter.execute(RemoteTestExecuter.java:120) 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:601) 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.container.test.impl.execution.ClientTestExecuter.execute(ClientTestExecuter.java:57) 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:601) 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.container.test.impl.client.ContainerEventController.createContext(ContainerEventController.java:142) at org.jboss.arquillian.container.test.impl.client.ContainerEventController.createTestContext(ContainerEventController.java:129) 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:601) 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:89) 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:601) 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: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:601) 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:60) 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:601) 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.test.impl.EventTestRunnerAdaptor.test(EventTestRunnerAdaptor.java:111) at org.jboss.arquillian.testng.Arquillian.run(Arquillian.java:158) 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:601) at org.testng.internal.MethodInvocationHelper.invokeHookable(MethodInvocationHelper.java:194) at org.testng.internal.Invoker.invokeMethod(Invoker.java:707) at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901) at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231) at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127) at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111) at org.testng.TestRunner.privateRun(TestRunner.java:767) at org.testng.TestRunner.run(TestRunner.java:617) at org.testng.SuiteRunner.runTest(SuiteRunner.java:334) at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329) at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291) at org.testng.SuiteRunner.run(SuiteRunner.java:240) at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52) at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86) at org.testng.TestNG.runSuitesSequentially(TestNG.java:1198) at org.testng.TestNG.runSuitesLocally(TestNG.java:1123) at org.testng.TestNG.run(TestNG.java:1031) at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:77) at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:110) at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:106) 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:601) at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189) at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165) at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75) "
  
  org.testng.AssertJUnit.fail(AssertJUnit.java:59)
  org.testng.AssertJUnit.assertTrue(AssertJUnit.java:24)
  org.testng.AssertJUnit.assertNotNull(AssertJUnit.java:267)
  org.testng.AssertJUnit.assertNotNull(AssertJUnit.java:259)
  my.beatiful.tests.JSFUnitTestExample.testInitialPage(JSFUnitTestExample.java:35)
  sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  java.lang.reflect.Method.invoke(Method.java:601)
  org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
  org.testng.internal.MethodInvocationHelper$1.runTestMethod(MethodInvocationHelper.java:182)
  org.jboss.arquillian.testng.Arquillian$2.invoke(Arquillian.java:167)
  org.jboss.arquillian.container.test.impl.execution.LocalTestExecuter.execute(LocalTestExecuter.java:60)
  sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  java.lang.reflect.Method.invoke(Method.java:601)
  org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
  org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
  org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
  org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
  org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
  org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
  org.jboss.arquillian.container.test.impl.client.protocol.local.LocalContainerMethodExecutor.invoke(LocalContainerMethodExecutor.java:50)
  org.jboss.arquillian.container.test.impl.execution.RemoteTestExecuter.execute(RemoteTestExecuter.java:120)
  sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  java.lang.reflect.Method.invoke(Method.java:601)
  org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
  org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
  org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
  org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
  org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
  org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
  org.jboss.arquillian.container.test.impl.execution.ClientTestExecuter.execute(ClientTestExecuter.java:57)
  sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  java.lang.reflect.Method.invoke(Method.java:601)
  org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
  org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
  org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
  org.jboss.arquillian.container.test.impl.client.ContainerEventController.createContext(ContainerEventController.java:142)
  org.jboss.arquillian.container.test.impl.client.ContainerEventController.createTestContext(ContainerEventController.java:129)
  sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  java.lang.reflect.Method.invoke(Method.java:601)
  org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
  org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
  org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:89)
  sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  java.lang.reflect.Method.invoke(Method.java:601)
  org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
  org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
  org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:75)
  sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  java.lang.reflect.Method.invoke(Method.java:601)
  org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
  org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
  org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:60)
  sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  java.lang.reflect.Method.invoke(Method.java:601)
  org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
  org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
  org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
  org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.test(EventTestRunnerAdaptor.java:111)
  org.jboss.arquillian.testng.Arquillian.run(Arquillian.java:158)
  sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  java.lang.reflect.Method.invoke(Method.java:601)
  org.testng.internal.MethodInvocationHelper.invokeHookable(MethodInvocationHelper.java:194)
  org.testng.internal.Invoker.invokeMethod(Invoker.java:707)
  org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
  org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
  org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
  org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
  org.testng.TestRunner.privateRun(TestRunner.java:767)
  org.testng.TestRunner.run(TestRunner.java:617)
  org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
  org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
  org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
  org.testng.SuiteRunner.run(SuiteRunner.java:240)
  org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
  org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
  org.testng.TestNG.runSuitesSequentially(TestNG.java:1198)
  org.testng.TestNG.runSuitesLocally(TestNG.java:1123)
  org.testng.TestNG.run(TestNG.java:1031)
  org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:77)
  org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:110)(... cut ... )
  </code></pre>