### Question:
DefaultCategoryService implements CategoryService { @Override @Transactional public void delete(Category category) { Category categoryToBeDeleted = categoryRepository.get(category.getId()); categoryRepository.delete(categoryToBeDeleted); } @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 delete() { expect(repository.get(validCategory.getId())).andReturn(validCategory); repository.delete(validCategory); expectLastCall(); replay(repository); service.delete(validCategory); verify(repository); }