title: "ERROR: 'Premature end of file.' " happens when generating snippets using Spring Restdocs
body: <p>I am using Spring Restdocs for documentation. Here's my code:</p>
  
  <pre><code>RestDocumentationResultHandler document = document("{class-name}/{method-name}",
      preprocessRequest(prettyPrint()),
      preprocessResponse(prettyPrint()));
  
  String authHead = TestUtils.performLogin(mockMvc, "user", "pass");
  mockMvc
      .perform(get("/svc/service")
      )
      .andExpect(status().is(200))
      .andExpect(content().contentType("application/json;charset=UTF-8"))
      .andExpect(jsonPath("$.childs").isArray())
      .andDo(document);
   }
  </code></pre>
  
  <p>.adoc files are successfully generated and af there's an error that I am struggling to solve it. </p>
  
  <pre><code>[Fatal Error] :1:1: Premature end of file.
  ERROR:  'Premature end of file.'
  </code></pre>
  
  <p>I think the problem comes from</p>
  
  <pre><code>preprocessResponse(prettyPrint())
  </code></pre>
  
  <p>Since i commented it out, the error disappears. But JSON response is NOT formated as i expected. I really appreciate your help. Thanks in advance.</p>