title: How to Inject FacesContext in Arquillian
body: <p>Is it possible to inject FacesContext in Arquillian test? Or better approach is to mock it? I couldn't find any example from the last years on the web. FacesContext is null. </p>
  
  <pre><code>@Category(Arquillian.class)
  @RunWith(Arquillian.class)
  public class ControllerIT extends ArquillianDeployementsIT {
  
  @Inject
  private Controller controller;
  
  
  @Test
  public void shouldInitialize() {
      controller.getStatistics();
  }
  
  
  @ManagedBean 
  @ViewScoped
  public class Controller {
  
  public void getStatistcs(
      FacesContext context = FacesContext.getCurrentInstance();
        }
  
     }
  </code></pre>
  
  <p>Thanks and regards</p>