}
@Test
public void updateWidgetComment() {
String message = "updated comment";
WidgetComment widgetComment = new WidgetComment();
widgetComment.setEntityId(2L);
expect(widgetCommentService.getWidgetComment(2L)).andReturn(widgetComment);
widgetCommentService.saveWidgetComment(widgetComment);
replay(widgetCommentService);
HttpServletResponse httpServletResponse = createMock(HttpServletResponse.class);
httpServletResponse.setStatus(HttpStatus.NO_CONTENT.value());
replay(httpServletResponse);
widgetApi.updateWidgetComment(1L, 2L, message, httpServletResponse);
assertEquals(message, widgetComment.getText());
verify(widgetCommentService);
verify(httpServletResponse);
}