### Question:
DefaultCategoryService implements CategoryService { @Override public List<Category> getAllList() { return categoryRepository.getAll(); } @Autowired  DefaultCategoryService(CategoryRepository categoryRepository); @Override Category get(String id); @Override List<Category> getAllList(); @Override SearchResult<Category> getAll(); @Override SearchResult<Category> getLimitedList(int offset, int pageSize); @Override @Transactional Category create(String text, User createdUser); @Override @Transactional Category update(String categoryId, String text, User lastModifiedUser); @Override @Transactional void delete(Category category);  }### Answer:
@Test public void getAllList() { List<Category> list = new ArrayList<Category>(); list.add(validCategory); list.add(new CategoryImpl()); list.add(new CategoryImpl()); expect(repository.getAll()).andReturn(list); replay(repository); assertThat(service.getAllList(), is(list)); verify(repository); }