verify(messageConverter).write(eq(body), eq(accepted), isA(HttpOutputMessage.class));
}
@Test
public void handleReturnValueProduces() throws Exception {
String body = "Foo";
<BUG>ResponseEntity<String> returnValue = new ResponseEntity<String>(body, HttpStatus.OK);
servletRequest.addHeader("Accept", "text/*");</BUG>
servletRequest.setAttribute(PRODUCIBLE_MEDIA_TYPES_ATTRIBUTE, Collections.singleton(MediaType.TEXT_HTML));
given(messageConverter.canWrite(String.class, MediaType.TEXT_HTML)).willReturn(true);
processor.handleReturnValue(returnValue, returnTypeResponseEntityProduces, mavContainer, webRequest);

verify(messageConverter).write(eq(body), eq(accepted), isA(HttpOutputMessage.class));
}
@Test
public void handleReturnValueProduces() throws Exception {
String body = "Foo";
ResponseEntity<String> returnValue = new ResponseEntity<>(body, HttpStatus.OK);
servletRequest.addHeader("Accept", "text/*");
servletRequest.setAttribute(PRODUCIBLE_MEDIA_TYPES_ATTRIBUTE, Collections.singleton(MediaType.TEXT_HTML));
given(messageConverter.canWrite(String.class, MediaType.TEXT_HTML)).willReturn(true);
processor.handleReturnValue(returnValue, returnTypeResponseEntityProduces, mavContainer, webRequest);
