### Question:
DefaultRegionWidgetService implements RegionWidgetService { @Override public SearchResult<RegionWidget> getAll() { final int count = regionWidgetRepository.getCountAll(); final List<RegionWidget> regionWidgets = regionWidgetRepository.getAll(); return new SearchResult<RegionWidget>(regionWidgets, count); } @Autowired  DefaultRegionWidgetService(RegionWidgetRepository regionWidgetRepository); @Override RegionWidget getRegionWidget(String regionWidgetId); @Override SearchResult<RegionWidget> getAll(); @Override SearchResult<RegionWidget> getLimitedList(int offset, int pageSize); @Override @Transactional RegionWidget saveRegionWidget(RegionWidget regionWidget); @Override @Synchronized(discriminator = "'RegionWidget'", id = "#regionWidgetId") @Transactional List<RegionWidgetPreference> saveRegionWidgetPreferences(String regionWidgetId,
                                                                    List<RegionWidgetPreference> preferences); @Override @Synchronized(discriminator = "'RegionWidget'", id = "#regionWidgetId") @Transactional RegionWidgetPreference saveRegionWidgetPreference(String regionWidgetId, RegionWidgetPreference preference); @Override @Transactional RegionWidget saveRegionWidgetCollapsedState(String regionWidgetId, boolean collapsed);  }### Answer:
@Test public void getAll() { List<RegionWidget> regionWidgets = new ArrayList<RegionWidget>(); expect(regionWidgetRepository.getCountAll()).andReturn(1); expect(regionWidgetRepository.getAll()).andReturn(regionWidgets); replay(regionWidgetRepository); List<RegionWidget> result = regionWidgetService.getAll().getResultSet(); assertThat(result, is(sameInstance(regionWidgets))); verify(regionWidgetRepository); }