diff --git a/spring-restdocs-core/src/test/java/org/springframework/restdocs/curl/CurlRequestSnippetTests.java b/spring-restdocs-core/src/test/java/org/springframework/restdocs/curl/CurlRequestSnippetTests.java
index 51964433..5e5b44c7 100644
--- a/spring-restdocs-core/src/test/java/org/springframework/restdocs/curl/CurlRequestSnippetTests.java
+++ b/spring-restdocs-core/src/test/java/org/springframework/restdocs/curl/CurlRequestSnippetTests.java
@@ -262,8 +262,8 @@ public class CurlRequestSnippetTests {
.request("http://localhost/upload").method("POST")
.header(HttpHeaders.CONTENT_TYPE,
MediaType.MULTIPART_FORM_DATA_VALUE)
- .part("metadata", "{\"description\": \"foo\"}".getBytes())
- .build());
+ .part("metadata", "{\"description\": \"foo\"}".getBytes())
+ .build());
}
@Test
@@ -279,9 +279,11 @@ public class CurlRequestSnippetTests {
.request("http://localhost/upload").method("POST")
.header(HttpHeaders.CONTENT_TYPE,
MediaType.MULTIPART_FORM_DATA_VALUE)
- .part("image", new byte[0])
- .header(HttpHeaders.CONTENT_TYPE, MediaType.IMAGE_PNG_VALUE)
- .submittedFileName("documents/images/example.png").build());
+ .part("image", new byte[0])
+ .header(HttpHeaders.CONTENT_TYPE,
+ MediaType.IMAGE_PNG_VALUE)
+ .submittedFileName("documents/images/example.png")
+ .build());
}
@Test
@@ -314,9 +316,10 @@ public class CurlRequestSnippetTests {
.request("http://localhost/upload").method("POST")
.header(HttpHeaders.CONTENT_TYPE,
MediaType.MULTIPART_FORM_DATA_VALUE)
- .part("image", new byte[0])
- .submittedFileName("documents/images/example.png").and()
- .param("a", "apple", "avocado").param("b", "banana").build());
+ .part("image", new byte[0])
+ .submittedFileName("documents/images/example.png").and()
+ .param("a", "apple", "avocado").param("b", "banana")
+ .build());
}
@Test
diff --git a/spring-restdocs-core/src/test/java/org/springframework/restdocs/headers/RequestHeadersSnippetTests.java b/spring-restdocs-core/src/test/java/org/springframework/restdocs/headers/RequestHeadersSnippetTests.java
index 27937169..5f493033 100644
--- a/spring-restdocs-core/src/test/java/org/springframework/restdocs/headers/RequestHeadersSnippetTests.java
+++ b/spring-restdocs-core/src/test/java/org/springframework/restdocs/headers/RequestHeadersSnippetTests.java
@@ -62,20 +62,18 @@ public class RequestHeadersSnippetTests {
.row("Accept", "two").row("Accept-Encoding", "three")
.row("Accept-Language", "four").row("Cache-Control", "five")
.row("Connection", "six"));
- new RequestHeadersSnippet(
- Arrays.asList(headerWithName("X-Test").description("one"),
- headerWithName("Accept").description("two"),
- headerWithName("Accept-Encoding").description("three"),
- headerWithName("Accept-Language").description("four"),
- headerWithName("Cache-Control").description("five"),
- headerWithName("Connection").description("six")))
- .document(new OperationBuilder("request-with-headers",
- this.snippet.getOutputDirectory())
- .request("http://localhost")
- .header("X-Test", "test")
- .header("Accept", "*/*")
- .header("Accept-Encoding",
- "gzip, deflate")
+ new RequestHeadersSnippet(Arrays.asList(
+ headerWithName("X-Test").description("one"),
+ headerWithName("Accept").description("two"),
+ headerWithName("Accept-Encoding").description("three"),
+ headerWithName("Accept-Language").description("four"),
+ headerWithName("Cache-Control").description("five"),
+ headerWithName("Connection").description("six")))
+ .document(new OperationBuilder("request-with-headers",
+ this.snippet.getOutputDirectory())
+ .request("http://localhost")
+ .header("X-Test", "test").header("Accept", "*/*")
+ .header("Accept-Encoding", "gzip, deflate")
.header("Accept-Language", "en-US,en;q=0.5")
.header("Cache-Control", "max-age=0")
.header("Connection", "keep-alive").build());
@@ -143,14 +141,15 @@ public class RequestHeadersSnippetTests {
TemplateResourceResolver resolver = mock(TemplateResourceResolver.class);
given(resolver.resolveTemplateResource("request-headers"))
.willReturn(snippetResource("request-headers-with-extra-column"));
- new RequestHeadersSnippet(Arrays.asList(
- headerWithName("X-Test").description("one")
- .attributes(key("foo").value("alpha")),
- headerWithName("Accept-Encoding").description("two")
- .attributes(key("foo").value("bravo")),
- headerWithName("Accept").description("three")
- .attributes(key("foo").value("charlie"))))
- .document(new OperationBuilder(
+ new RequestHeadersSnippet(
+ Arrays.asList(
+ headerWithName("X-Test").description("one")
+ .attributes(key("foo").value(
+ "alpha")),
+ headerWithName("Accept-Encoding").description("two")
+ .attributes(key("foo").value("bravo")),
+ headerWithName("Accept").description("three").attributes(key(
+ "foo").value("charlie")))).document(new OperationBuilder(
"request-headers-with-custom-attributes",
this.snippet.getOutputDirectory())
.attribute(TemplateEngine.class.getName(),
diff --git a/spring-restdocs-core/src/test/java/org/springframework/restdocs/headers/ResponseHeadersSnippetTests.java b/spring-restdocs-core/src/test/java/org/springframework/restdocs/headers/ResponseHeadersSnippetTests.java
index 8f5dd609..41fe5fcd 100644
--- a/spring-restdocs-core/src/test/java/org/springframework/restdocs/headers/ResponseHeadersSnippetTests.java
+++ b/spring-restdocs-core/src/test/java/org/springframework/restdocs/headers/ResponseHeadersSnippetTests.java
@@ -72,9 +72,9 @@ public class ResponseHeadersSnippetTests {
.header("X-Test", "test")
.header("Content-Type",
"application/json")
- .header("Etag", "lskjadldj3ii32l2ij23")
- .header("Cache-Control", "max-age=0")
- .header("Vary", "User-Agent").build());
+ .header("Etag", "lskjadldj3ii32l2ij23")
+ .header("Cache-Control", "max-age=0")
+ .header("Vary", "User-Agent").build());
}
@Test
@@ -107,15 +107,20 @@ public class ResponseHeadersSnippetTests {
.attributes(key("foo").value("charlie"))))
.document(new OperationBuilder(
"response-headers-with-custom-attributes",
- this.snippet.getOutputDirectory())
- .attribute(TemplateEngine.class.getName(),
- new MustacheTemplateEngine(
- resolver))
- .response().header("X-Test", "test")
- .header("Content-Type",
- "application/json")
- .header("Etag", "lskjadldj3ii32l2ij23")
- .build());
+ this.snippet
+ .getOutputDirectory())
+ .attribute(
+ TemplateEngine.class
+ .getName(),
+ new MustacheTemplateEngine(
+ resolver))
+ .response()
+ .header("X-Test", "test")
+ .header("Content-Type",
+ "application/json")
+ .header("Etag",
+ "lskjadldj3ii32l2ij23")
+ .build());
}
@Test
diff --git a/spring-restdocs-core/src/test/java/org/springframework/restdocs/http/HttpRequestSnippetTests.java b/spring-restdocs-core/src/test/java/org/springframework/restdocs/http/HttpRequestSnippetTests.java
index 5175edd8..ed030232 100644
--- a/spring-restdocs-core/src/test/java/org/springframework/restdocs/http/HttpRequestSnippetTests.java
+++ b/spring-restdocs-core/src/test/java/org/springframework/restdocs/http/HttpRequestSnippetTests.java
@@ -92,8 +92,8 @@ public class HttpRequestSnippetTests {
String content = "Hello, world";
this.snippet.expectHttpRequest("post-request-with-content")
.withContents(httpRequest(RequestMethod.POST, "/foo")
- .header(HttpHeaders.HOST, "localhost").content(content)
- .header(HttpHeaders.CONTENT_LENGTH, content.getBytes().length));
+ .header(HttpHeaders.HOST, "localhost").content(content).header(
+ HttpHeaders.CONTENT_LENGTH, content.getBytes().length));
new HttpRequestSnippet()
.document(new OperationBuilder("post-request-with-content",
@@ -154,8 +154,8 @@ public class HttpRequestSnippetTests {
String content = "Hello, world";
this.snippet.expectHttpRequest("put-request-with-content")
.withContents(httpRequest(RequestMethod.PUT, "/foo")
- .header(HttpHeaders.HOST, "localhost").content(content)
- .header(HttpHeaders.CONTENT_LENGTH, content.getBytes().length));
+ .header(HttpHeaders.HOST, "localhost").content(content).header(
+ HttpHeaders.CONTENT_LENGTH, content.getBytes().length));
new HttpRequestSnippet().document(new OperationBuilder("put-request-with-content",
this.snippet.getOutputDirectory()).request("http://localhost/foo")
@@ -223,8 +223,8 @@ public class HttpRequestSnippetTests {
.request("http://localhost/upload").method("POST")
.header(HttpHeaders.CONTENT_TYPE,
MediaType.MULTIPART_FORM_DATA_VALUE)
- .param("a", "apple", "avocado").param("b", "banana")
- .part("image", "<< data >>".getBytes()).build());
+ .param("a", "apple", "avocado").param("b", "banana")
+ .part("image", "<< data >>".getBytes()).build());
}
@Test
@@ -269,9 +269,10 @@ public class HttpRequestSnippetTests {
.request("http://localhost/upload").method("POST")
.header(HttpHeaders.CONTENT_TYPE,
MediaType.MULTIPART_FORM_DATA_VALUE)
- .part("image", "<< data >>".getBytes())
- .header(HttpHeaders.CONTENT_TYPE, MediaType.IMAGE_PNG_VALUE)
- .build());
+ .part("image", "<< data >>".getBytes())
+ .header(HttpHeaders.CONTENT_TYPE,
+ MediaType.IMAGE_PNG_VALUE)
+ .build());
}
@Test
diff --git a/spring-restdocs-core/src/test/java/org/springframework/restdocs/operation/preprocess/PrettyPrintingContentModifierTests.java b/spring-restdocs-core/src/test/java/org/springframework/restdocs/operation/preprocess/PrettyPrintingContentModifierTests.java
index 84accb52..319c37fb 100644
--- a/spring-restdocs-core/src/test/java/org/springframework/restdocs/operation/preprocess/PrettyPrintingContentModifierTests.java
+++ b/spring-restdocs-core/src/test/java/org/springframework/restdocs/operation/preprocess/PrettyPrintingContentModifierTests.java
@@ -56,7 +56,7 @@ public class PrettyPrintingContentModifierTests {
equalTo(String
.format("%n"
+ "%n %n%n")
- .getBytes()));
+ .getBytes()));
}
@Test
diff --git a/spring-restdocs-core/src/test/java/org/springframework/restdocs/payload/RequestFieldsSnippetTests.java b/spring-restdocs-core/src/test/java/org/springframework/restdocs/payload/RequestFieldsSnippetTests.java
index 40097f3d..52326fdb 100644
--- a/spring-restdocs-core/src/test/java/org/springframework/restdocs/payload/RequestFieldsSnippetTests.java
+++ b/spring-restdocs-core/src/test/java/org/springframework/restdocs/payload/RequestFieldsSnippetTests.java
@@ -61,8 +61,8 @@ public class RequestFieldsSnippetTests {
public void mapRequestWithFields() throws IOException {
this.snippet.expectRequestFields("map-request-with-fields")
.withContents(tableWithHeader("Path", "Type", "Description")
- .row("a.b", "Number", "one").row("a.c", "String", "two")
- .row("a", "Object", "three"));
+ .row("a.b", "Number", "one").row("a.c", "String", "two").row("a",
+ "Object", "three"));
new RequestFieldsSnippet(Arrays.asList(fieldWithPath("a.b").description("one"),
fieldWithPath("a.c").description("two"),
@@ -132,11 +132,13 @@ public class RequestFieldsSnippetTests {
@Test
public void missingOptionalRequestFieldWithNoTypeProvided() throws IOException {
this.thrown.expect(FieldTypeRequiredException.class);
- new RequestFieldsSnippet(Arrays.asList(fieldWithPath("a.b").description("one")
- .optional())).document(new OperationBuilder(
- "missing-optional-request-field-with-no-type",
- this.snippet.getOutputDirectory()).request("http://localhost")
- .content("{ }").build());
+ new RequestFieldsSnippet(
+ Arrays.asList(fieldWithPath("a.b").description("one").optional()))
+ .document(new OperationBuilder(
+ "missing-optional-request-field-with-no-type",
+ this.snippet.getOutputDirectory())
+ .request("http://localhost").content("{ }")
+ .build());
}
@Test
@@ -175,14 +177,17 @@ public class RequestFieldsSnippetTests {
.attributes(key("foo").value("charlie"))))
.document(new OperationBuilder(
"request-fields-with-custom-descriptor-attributes",
- this.snippet.getOutputDirectory())
- .attribute(TemplateEngine.class.getName(),
- new MustacheTemplateEngine(
- resolver))
- .request("http://localhost")
- .content(
- "{\"a\": {\"b\": 5, \"c\": \"charlie\"}}")
- .build());
+ this.snippet
+ .getOutputDirectory())
+ .attribute(
+ TemplateEngine.class
+ .getName(),
+ new MustacheTemplateEngine(
+ resolver))
+ .request("http://localhost")
+ .content(
+ "{\"a\": {\"b\": 5, \"c\": \"charlie\"}}")
+ .build());
}
@Test
@@ -228,8 +233,8 @@ public class RequestFieldsSnippetTests {
public void xmlRequestFields() throws IOException {
this.snippet.expectRequestFields("xml-request")
.withContents(tableWithHeader("Path", "Type", "Description")
- .row("a/b", "b", "one").row("a/c", "c", "two")
- .row("a", "a", "three"));
+ .row("a/b", "b", "one").row("a/c", "c", "two").row("a", "a",
+ "three"));
new RequestFieldsSnippet(
Arrays.asList(fieldWithPath("a/b").description("one").type("b"),
@@ -241,7 +246,7 @@ public class RequestFieldsSnippetTests {
.content("5charlie")
.header(HttpHeaders.CONTENT_TYPE,
MediaType.APPLICATION_XML_VALUE)
- .build());
+ .build());
}
@Test
@@ -283,7 +288,7 @@ public class RequestFieldsSnippetTests {
.content("")
.header(HttpHeaders.CONTENT_TYPE,
MediaType.APPLICATION_XML_VALUE)
- .build());
+ .build());
}
@Test
diff --git a/spring-restdocs-core/src/test/java/org/springframework/restdocs/payload/ResponseFieldsSnippetTests.java b/spring-restdocs-core/src/test/java/org/springframework/restdocs/payload/ResponseFieldsSnippetTests.java
index a33a4fec..6c3eff3d 100644
--- a/spring-restdocs-core/src/test/java/org/springframework/restdocs/payload/ResponseFieldsSnippetTests.java
+++ b/spring-restdocs-core/src/test/java/org/springframework/restdocs/payload/ResponseFieldsSnippetTests.java
@@ -94,7 +94,7 @@ public class ResponseFieldsSnippetTests {
.response()
.content(
"[{\"a\": {\"b\": 5}},{\"a\": {\"c\": \"charlie\"}}]")
- .build());
+ .build());
}
@Test
@@ -141,14 +141,17 @@ public class ResponseFieldsSnippetTests {
.attributes(key("foo").value("charlie"))))
.document(new OperationBuilder(
"response-fields-with-custom-attributes",
- this.snippet.getOutputDirectory())
- .attribute(TemplateEngine.class.getName(),
- new MustacheTemplateEngine(
- resolver))
- .response()
- .content(
- "{\"a\": {\"b\": 5, \"c\": \"charlie\"}}")
- .build());
+ this.snippet
+ .getOutputDirectory())
+ .attribute(
+ TemplateEngine.class
+ .getName(),
+ new MustacheTemplateEngine(
+ resolver))
+ .response()
+ .content(
+ "{\"a\": {\"b\": 5, \"c\": \"charlie\"}}")
+ .build());
}
@Test
@@ -172,8 +175,8 @@ public class ResponseFieldsSnippetTests {
public void xmlResponseFields() throws IOException {
this.snippet.expectResponseFields("xml-response")
.withContents(tableWithHeader("Path", "Type", "Description")
- .row("a/b", "b", "one").row("a/c", "c", "two")
- .row("a", "a", "three"));
+ .row("a/b", "b", "one").row("a/c", "c", "two").row("a", "a",
+ "three"));
new ResponseFieldsSnippet(
Arrays.asList(fieldWithPath("a/b").description("one").type("b"),
fieldWithPath("a/c").description("two").type("c"),
@@ -183,7 +186,7 @@ public class ResponseFieldsSnippetTests {
.content("5charlie")
.header(HttpHeaders.CONTENT_TYPE,
MediaType.APPLICATION_XML_VALUE)
- .build());
+ .build());
}
@Test
@@ -199,7 +202,7 @@ public class ResponseFieldsSnippetTests {
.content("5")
.header(HttpHeaders.CONTENT_TYPE,
MediaType.APPLICATION_XML_VALUE)
- .build());
+ .build());
}
@Test
@@ -215,7 +218,7 @@ public class ResponseFieldsSnippetTests {
.content("foo")
.header(HttpHeaders.CONTENT_TYPE,
MediaType.APPLICATION_XML_VALUE)
- .build());
+ .build());
}
@Test
@@ -231,7 +234,7 @@ public class ResponseFieldsSnippetTests {
.content("foo")
.header(HttpHeaders.CONTENT_TYPE,
MediaType.APPLICATION_XML_VALUE)
- .build());
+ .build());
}
@Test
@@ -263,7 +266,7 @@ public class ResponseFieldsSnippetTests {
.content("bar")
.header(HttpHeaders.CONTENT_TYPE,
MediaType.APPLICATION_XML_VALUE)
- .build());
+ .build());
}
@Test
@@ -273,15 +276,14 @@ public class ResponseFieldsSnippetTests {
String.format("The following parts of the payload were not documented:"
+ "%nbar%n")));
new ResponseFieldsSnippet(
- Arrays.asList(
- fieldWithPath("a/@id").description("one")
- .type("a"))).document(new OperationBuilder(
- "documented-attribute-is-removed",
+ Arrays.asList(fieldWithPath("a/@id").description("one").type("a")))
+ .document(
+ new OperationBuilder("documented-attribute-is-removed",
this.snippet.getOutputDirectory()).response()
.content("bar")
.header(HttpHeaders.CONTENT_TYPE,
MediaType.APPLICATION_XML_VALUE)
- .build());
+ .build());
}
@Test
@@ -308,7 +310,7 @@ public class ResponseFieldsSnippetTests {
.content("")
.header(HttpHeaders.CONTENT_TYPE,
MediaType.APPLICATION_XML_VALUE)
- .build());
+ .build());
}
@Test
@@ -329,7 +331,7 @@ public class ResponseFieldsSnippetTests {
.content("5")
.header(HttpHeaders.CONTENT_TYPE,
MediaType.APPLICATION_XML_VALUE)
- .build());
+ .build());
}
private FileSystemResource snippetResource(String name) {
diff --git a/spring-restdocs-core/src/test/java/org/springframework/restdocs/request/PathParametersSnippetTests.java b/spring-restdocs-core/src/test/java/org/springframework/restdocs/request/PathParametersSnippetTests.java
index 885ba390..51b1aad9 100644
--- a/spring-restdocs-core/src/test/java/org/springframework/restdocs/request/PathParametersSnippetTests.java
+++ b/spring-restdocs-core/src/test/java/org/springframework/restdocs/request/PathParametersSnippetTests.java
@@ -79,7 +79,7 @@ public class PathParametersSnippetTests {
.document(new OperationBuilder("missing-path-parameter",
this.snippet.getOutputDirectory()).attribute(
"org.springframework.restdocs.urlTemplate", "/")
- .build());
+ .build());
}
@Test
@@ -104,11 +104,13 @@ public class PathParametersSnippetTests {
tableWithTitleAndHeader("/{a}/{b}", "Parameter", "Description")
.row("a", "one").row("b", "two"));
new PathParametersSnippet(Arrays.asList(parameterWithName("a").description("one"),
- parameterWithName("b").description("two"))).document(new OperationBuilder(
- "path-parameters", this.snippet.getOutputDirectory())
- .attribute("org.springframework.restdocs.urlTemplate",
- "/{a}/{b}")
- .build());
+ parameterWithName("b").description("two")))
+ .document(new OperationBuilder(
+ "path-parameters", this.snippet.getOutputDirectory())
+ .attribute(
+ "org.springframework.restdocs.urlTemplate",
+ "/{a}/{b}")
+ .build());
}
@Test
@@ -117,11 +119,14 @@ public class PathParametersSnippetTests {
tableWithTitleAndHeader("/{a}/{b}", "Parameter", "Description").row("b",
"two"));
new PathParametersSnippet(Arrays.asList(parameterWithName("a").ignored(),
- parameterWithName("b").description("two"))).document(new OperationBuilder(
- "ignored-path-parameter", this.snippet.getOutputDirectory())
- .attribute("org.springframework.restdocs.urlTemplate",
- "/{a}/{b}")
- .build());
+ parameterWithName("b").description("two")))
+ .document(new OperationBuilder(
+ "ignored-path-parameter",
+ this.snippet.getOutputDirectory())
+ .attribute(
+ "org.springframework.restdocs.urlTemplate",
+ "/{a}/{b}")
+ .build());
}
@Test
@@ -156,9 +161,10 @@ public class PathParametersSnippetTests {
parameterWithName("b").description("two").attributes(
key("foo").value("bravo")))).document(new OperationBuilder(
"path-parameters-with-custom-descriptor-attributes",
- this.snippet.getOutputDirectory()).attribute(
- "org.springframework.restdocs.urlTemplate",
- "/{a}/{b}")
+ this.snippet.getOutputDirectory())
+ .attribute(
+ "org.springframework.restdocs.urlTemplate",
+ "/{a}/{b}")
.attribute(TemplateEngine.class.getName(),
new MustacheTemplateEngine(resolver))
.build());
@@ -176,8 +182,8 @@ public class PathParametersSnippetTests {
Arrays.asList(
parameterWithName("a").description("one")
.attributes(key("foo").value("alpha")),
- parameterWithName("b").description("two")
- .attributes(key("foo").value("bravo"))),
+ parameterWithName("b").description("two")
+ .attributes(key("foo").value("bravo"))),
attributes(key("title").value("The title"))).document(
new OperationBuilder("path-parameters-with-custom-attributes",
this.snippet.getOutputDirectory())
diff --git a/spring-restdocs-core/src/test/java/org/springframework/restdocs/request/RequestParametersSnippetTests.java b/spring-restdocs-core/src/test/java/org/springframework/restdocs/request/RequestParametersSnippetTests.java
index c4b05f35..97b4253b 100644
--- a/spring-restdocs-core/src/test/java/org/springframework/restdocs/request/RequestParametersSnippetTests.java
+++ b/spring-restdocs-core/src/test/java/org/springframework/restdocs/request/RequestParametersSnippetTests.java
@@ -151,13 +151,16 @@ public class RequestParametersSnippetTests {
.attributes(key("foo").value("bravo"))))
.document(new OperationBuilder(
"request-parameters-with-custom-descriptor-attributes",
- this.snippet.getOutputDirectory())
- .attribute(TemplateEngine.class.getName(),
- new MustacheTemplateEngine(
- resolver))
- .request("http://localhost")
- .param("a", "alpha").param("b", "bravo")
- .build());
+ this.snippet
+ .getOutputDirectory())
+ .attribute(
+ TemplateEngine.class
+ .getName(),
+ new MustacheTemplateEngine(
+ resolver))
+ .request("http://localhost")
+ .param("a", "alpha")
+ .param("b", "bravo").build());
}
@Test
@@ -172,8 +175,8 @@ public class RequestParametersSnippetTests {
Arrays.asList(
parameterWithName("a").description("one")
.attributes(key("foo").value("alpha")),
- parameterWithName("b").description("two")
- .attributes(key("foo").value("bravo"))),
+ parameterWithName("b").description("two")
+ .attributes(key("foo").value("bravo"))),
attributes(key("title").value("The title"))).document(
new OperationBuilder("request-parameters-with-custom-attributes",
this.snippet.getOutputDirectory())
diff --git a/spring-restdocs-mockmvc/src/test/java/org/springframework/restdocs/mockmvc/MockMvcRestDocumentationIntegrationTests.java b/spring-restdocs-mockmvc/src/test/java/org/springframework/restdocs/mockmvc/MockMvcRestDocumentationIntegrationTests.java
index f37ce499..86dd0f55 100644
--- a/spring-restdocs-mockmvc/src/test/java/org/springframework/restdocs/mockmvc/MockMvcRestDocumentationIntegrationTests.java
+++ b/spring-restdocs-mockmvc/src/test/java/org/springframework/restdocs/mockmvc/MockMvcRestDocumentationIntegrationTests.java
@@ -217,9 +217,8 @@ public class MockMvcRestDocumentationIntegrationTests {
mockMvc.perform(get("/").param("foo", "bar").accept(MediaType.APPLICATION_JSON))
.andExpect(status().isOk())
- .andDo(document("links",
- responseFields(fieldWithPath("a")
- .description("The description"),
+ .andDo(document("links", responseFields(
+ fieldWithPath("a").description("The description"),
fieldWithPath("links").description("Links to other resources"))));
assertExpectedSnippetFilesExist(new File("build/generated-snippets/links"),