title: Play Framework csrf token generation in unit test
body: <p>I have two unit tests that fails because of "[RuntimeException: Missing CSRF Token]":</p>
  
  <pre><code>running(testServer(3333, provideFakeApplication()), () -&gt; {
      assertThat(WS.url("http://localhost:3333").get().get(3000).getStatus()
                  ).isEqualTo(OK);
  </code></pre>
  
  <p>and</p>
  
  <pre><code>running(testServer(3333, provideFakeApplication()), HTMLUNIT, browser -&gt; {
      browser.goTo("http://localhost:3333");
      assert....
  </code></pre>
  
  <p>How can I add a session with a CSRF token to the WS.url and the browser.goTo?</p>
  
  <p>The tests are trying to reach a page that has a form.</p>