title: RestAssuredRestDocumentationConfigurer causing NullPointerException
body: <p>I am using Spring Boot and Rest Docs + Rest Assured to test my API. Here is my pom</p>
  
  <pre><code>&lt;properties&gt;
          &lt;spring-restdocs.version&gt;1.2.2.RELEASE&lt;/spring-restdocs.version&gt;
  &lt;/properties&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.restdocs&lt;/groupId&gt;
              &lt;artifactId&gt;spring-restdocs-core&lt;/artifactId&gt;
              &lt;version&gt;${spring-restdocs.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.restdocs&lt;/groupId&gt;
              &lt;artifactId&gt;spring-restdocs-restassured&lt;/artifactId&gt;
              &lt;version&gt;${spring-restdocs.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.jayway.restassured&lt;/groupId&gt;
              &lt;artifactId&gt;rest-assured&lt;/artifactId&gt;
              &lt;version&gt;2.7.0&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  </code></pre>
  
  <p>Here is my test</p>
  
  <pre><code>import com.jayway.restassured.RestAssured;
  import com.jayway.restassured.builder.RequestSpecBuilder;
  import com.jayway.restassured.specification.RequestSpecification;
  import org.junit.Before;
  import org.junit.Rule;
  import org.junit.Test;
  import org.junit.runner.RunWith;
  import org.springframework.boot.test.context.SpringBootTest;
  import org.springframework.http.MediaType;
  import org.springframework.restdocs.JUnitRestDocumentation;
  import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
  
  import java.util.HashMap;
  import java.util.Map;
  
  import static org.hamcrest.core.Is.is;
  import static org.springframework.restdocs.restassured.RestAssuredRestDocumentation.document;
  import static org.springframework.restdocs.restassured.RestAssuredRestDocumentation.documentationConfiguration;
  
  @SpringBootTest
  @RunWith(SpringJUnit4ClassRunner.class)
  public class OAuth2Test {
  
      @Rule
      public JUnitRestDocumentation restDocumentation = new JUnitRestDocumentation();
  
      private RequestSpecification spec;
  
      private Map&lt;String, String&gt; queryParams;
  
      private int serverPort = 8090;
  
      @Before
      public void setUp() {
          this.spec = new RequestSpecBuilder().addFilter(documentationConfiguration(this.restDocumentation)).build();
          spec.port(serverPort);
          spec.authentication().basic("myclient", "secret");
          spec.accept(MediaType.APPLICATION_JSON_VALUE);
          queryParams = new HashMap&lt;&gt;();
          queryParams.put("username", "joe");
          queryParams.put("password", "abcd123");
          queryParams.put("grant_type", "password");
          queryParams.put("scope", "read");
      }
  
      @Test
      public void testOAuth() {
          RestAssured.given(this.spec)
                  .filter(document("token"))
                  .queryParameters(queryParams)
                  .when().post("/oauth/token")
                  .then().assertThat().statusCode(is(200));
      }
  }
  </code></pre>
  
  <p>But when I run it, I get a NullPointerException when RestDocs tries setting the configuration.</p>
  
  <pre><code>java.lang.NullPointerException
      at java.util.HashMap.putMapEntries(HashMap.java:500)
      at java.util.HashMap.&lt;init&gt;(HashMap.java:489)
      at org.springframework.restdocs.restassured.RestDocumentationFilter.getConfiguration(RestDocumentationFilter.java:77)
      at org.springframework.restdocs.restassured.RestDocumentationFilter.filter(RestDocumentationFilter.java:59)
      at com.jayway.restassured.filter.Filter$filter.call(Unknown Source)
      at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
      at com.jayway.restassured.filter.Filter$filter.call(Unknown Source)
      at com.jayway.restassured.internal.filter.FilterContextImpl.next(FilterContextImpl.groovy:71)
      at org.springframework.restdocs.restassured.RestAssuredRestDocumentationConfigurer.filter(RestAssuredRestDocumentationConfigurer.java:69)
      at com.jayway.restassured.filter.Filter$filter.call(Unknown Source)
      at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:141)
      at com.jayway.restassured.internal.filter.FilterContextImpl.next(FilterContextImpl.groovy:71)
      at com.jayway.restassured.filter.FilterContext$next.call(Unknown Source)
      at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:133)
      at com.jayway.restassured.internal.RequestSpecificationImpl.applyPathParamsAndSendRequest(RequestSpecificationImpl.groovy:1466)
      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:498)
      at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
      at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
      at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1218)
      at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1027)
      at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:815)
      at com.jayway.restassured.internal.RequestSpecificationImpl.invokeMethod(RequestSpecificationImpl.groovy)
      at org.codehaus.groovy.runtime.callsite.PogoInterceptableSite.call(PogoInterceptableSite.java:48)
      at org.codehaus.groovy.runtime.callsite.PogoInterceptableSite.callCurrent(PogoInterceptableSite.java:58)
      at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:52)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:154)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:182)
      at com.jayway.restassured.internal.RequestSpecificationImpl.post(RequestSpecificationImpl.groovy:155)
      at com.jayway.restassured.internal.RequestSpecificationImpl.post(RequestSpecificationImpl.groovy)
      at com.greeno.ralts.api.test.OAuth2Test.testOAuth(OAuth2Test.java:55)
      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:498)
      at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
      at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
      at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
      at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
      at org.springframework.restdocs.JUnitRestDocumentation$1.evaluate(JUnitRestDocumentation.java:63)
      at org.junit.rules.RunRules.evaluate(RunRules.java:20)
      at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
      at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
      at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
      at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
      at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
      at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
      at org.junit.runners.Suite.runChild(Suite.java:128)
      at org.junit.runners.Suite.runChild(Suite.java:27)
      at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
      at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
      at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
      at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
      at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
      at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
      at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
      at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
      at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
      at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
  </code></pre>
  
  <p>Here is the <code>filter</code> method that passes the null Map that causes the null pointer</p>
  
  <p><a href="https://i.stack.imgur.com/PUjYc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PUjYc.png" alt="enter image description here"></a></p>
  
  <p>And the root cause of this is because the <code>properties</code> field of <code>context</code> (which is of type <code>FilterContextImpl</code>) is null</p>
  
  <p>Maybe I'm messing up the setup or something? I am following the guide here
  <a href="https://docs.spring.io/spring-restdocs/docs/current/reference/html5/" rel="nofollow noreferrer">https://docs.spring.io/spring-restdocs/docs/current/reference/html5/</a></p>