@Test public void testFindDefaultWidget() { BaseUser user = new BaseUser(); user.setId(1l); user.setFirstName("First1"); user.setLastName("Last1"); Widget expected = new Widget(); expected.setName("Widget1"); expected.setUrl("/url/widget1"); expected.setDescription("This is widget 1"); when(widgetDao.findDefaultWidget(user)).thenReturn(Arrays.asList(expected)); List<Widget> actual = widgetService.findDefaultWidget(user); verify(widgetDao).findDefaultWidget(user); assertEquals(Arrays.asList(expected), actual); }
@Override public List<Widget> findDefaultWidget(BaseUser user) { return ((WidgetDao) getDao()).findDefaultWidget(user); }
WidgetServiceImpl extends BaseCrudServiceImpl<Widget> implements
		WidgetService { @Override public List<Widget> findDefaultWidget(BaseUser user) { return ((WidgetDao) getDao()).findDefaultWidget(user); } }
WidgetServiceImpl extends BaseCrudServiceImpl<Widget> implements
		WidgetService { @Override public List<Widget> findDefaultWidget(BaseUser user) { return ((WidgetDao) getDao()).findDefaultWidget(user); }  }
WidgetServiceImpl extends BaseCrudServiceImpl<Widget> implements
		WidgetService { @Override public List<Widget> findDefaultWidget(BaseUser user) { return ((WidgetDao) getDao()).findDefaultWidget(user); }  @Override Widget findByName(String name); @Override Widget findByUrl(String url); @Override List<Widget> getCurrentUserWidgets(); @Override Widget requestWidget(String widgetUrl, String name,
			HttpServletRequest req); @Override int getColumnConfig(); @Override List<Widget> findDefaultWidget(BaseUser user); @Override List<Widget> findWidgetWithAccessCode(List<String> accessCodes); void setIPAddress(String iPAddress); String getWidgetColumn(); void setWidgetColumn(String widgetColumn); }
WidgetServiceImpl extends BaseCrudServiceImpl<Widget> implements
		WidgetService { @Override public List<Widget> findDefaultWidget(BaseUser user) { return ((WidgetDao) getDao()).findDefaultWidget(user); }  @Override Widget findByName(String name); @Override Widget findByUrl(String url); @Override List<Widget> getCurrentUserWidgets(); @Override Widget requestWidget(String widgetUrl, String name,
			HttpServletRequest req); @Override int getColumnConfig(); @Override List<Widget> findDefaultWidget(BaseUser user); @Override List<Widget> findWidgetWithAccessCode(List<String> accessCodes); void setIPAddress(String iPAddress); String getWidgetColumn(); void setWidgetColumn(String widgetColumn);  }