From 35847ad0032381d8edcf1545ffabc7b3bfd397f2 Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Tue, 7 May 2013 21:38:45 +0200 Subject: [PATCH] Fixed MockMvc example code Issue: SPR-10389 --- src/reference/docbook/testing.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/reference/docbook/testing.xml b/src/reference/docbook/testing.xml index 35cdc5d901d..72bb4d3c8f4 100644 --- a/src/reference/docbook/testing.xml +++ b/src/reference/docbook/testing.xml @@ -3118,10 +3118,10 @@ public class ExampleTests { @Test public void getAccount() throws Exception { - this.mockMvc.perform(get("/accounts/1").accept("application/json;charset=UTF-8")) + this.mockMvc.perform(get("/accounts/1").accept(MediaType.parseMediaType("application/json;charset=UTF-8"))) .andExpect(status().isOk()) .andExpect(content().contentType("application/json")) - .andExpect(jsonPath("$.name").value("Lee"); + .andExpect(jsonPath("$.name").value("Lee")); } }