replay(service, categoryService);
String adminWidgetDetailView = controller.viewWidgetDetail(entityId,REFERRER_ID, model);
verify(service, categoryService);
assertEquals(ViewNames.ADMIN_WIDGETDETAIL, adminWidgetDetailView);
assertTrue(model.containsAttribute(TABS));
assertEquals(widget, model.asMap().get("widget"));
assertThat(model.containsAttribute(ModelKeys.CATEGORIES), is(true));
assertThat((List<Category>) model.asMap().get(ModelKeys.CATEGORIES), is(categories));
assertThat((String) model.asMap().get(ModelKeys.REFERRING_PAGE_ID), is(equalTo(REFERRER_ID)));
}