WidgetImpl widget = new WidgetImpl("123", widgetUrl);
widget.setTitle("WidgetImpl title");
widget.setType("OpenSocial");
widget.setDescription("Lorem ipsum");
BindingResult errors = new BeanPropertyBindingResult(widget, "widget");
SessionStatus sessionStatus = createMock(SessionStatus.class);
ModelMap modelMap = new ExtendedModelMap();
expect(service.getWidgetByUrl(widgetUrl)).andReturn(widget);
service.updateWidget(widget);
sessionStatus.setComplete();
expectLastCall();
replay(service, sessionStatus);
String view = controller.updateWidgetDetail(widget, errors, validToken, validToken,REFERRER_ID, modelMap, sessionStatus);
verify(service, sessionStatus);