### Question:
CategoryService { public Iterable<Category> findAll() { return categoryRepository.findAll(); }  Iterable<Category> findAll();  }### Answer:
@Test public void shouldReturnTheCategories() { List<Category> categories = TestDataFactory.getCategories(6); when(categoryRepository.findAll()).thenReturn(categories); assertThat(categoryService.findAll()).isEqualTo(categories); }