<BUG>String href = link.isTemplated() ? link.expand().getHref() : link.getHref();MockHttpServletResponse response = mvc.perform(MockMvcRequestBuilders.request(HttpMethod.PATCH, href).//content(payload.toString()).contentType(mediaType)).//andExpect(status().is2xxSuccessful()).//</BUG><CONTEXT>andExpect(status().is2xxSuccessful()).//andReturn().getResponse();return StringUtils.hasText(response.getContentAsString()) ? response : client.request(link);}protected MockHttpServletResponse patchAndGet(Link link, Object payload, MediaType mediaType) throws Exception {<extra_id_0>andReturn().getResponse();</CONTEXT>
MockHttpServletResponse response = mvccontent(payload.toString()).contentType(mediaType))