### Question:
DefaultRegionService implements RegionService { @Override public SearchResult<Region> getAll() { final int count = regionRepository.getCountAll(); final List<Region> regions = regionRepository.getAll(); return new SearchResult<Region>(regions, count); } @Autowired  DefaultRegionService(RegionRepository regionRepository); @Override @Transactional void registerNewRegion(Region region); @Override SearchResult<Region> getAll(); @Override SearchResult<Region> getLimitedList(int offset, int pageSize);  }### Answer:
@Test public void getAll() { List<Region> regions = new ArrayList<Region>(); expect(regionRepository.getCountAll()).andReturn(1); expect(regionRepository.getAll()).andReturn(regions); replay(regionRepository); List<Region> result = regionService.getAll().getResultSet(); assertThat(result, is(sameInstance(regions))); verify(regionRepository); }