@Test public void findAllTest() { List<Category> genericEntities = new ArrayList<>(Arrays.asList(new Category(), new Category())); when(categoryRepo.findAll()).thenReturn(genericEntities); List<Category> foundEntities = categoryService.findAll(); assertEquals(genericEntities, foundEntities); }
@Override public List<Category> findAll() { log.info(LogMessage.IN_FIND_ALL); return categoryRepo.findAll(); }
CategoryServiceImpl implements CategoryService { @Override public List<Category> findAll() { log.info(LogMessage.IN_FIND_ALL); return categoryRepo.findAll(); } }
CategoryServiceImpl implements CategoryService { @Override public List<Category> findAll() { log.info(LogMessage.IN_FIND_ALL); return categoryRepo.findAll(); }  }
CategoryServiceImpl implements CategoryService { @Override public List<Category> findAll() { log.info(LogMessage.IN_FIND_ALL); return categoryRepo.findAll(); }  @Override Category save(CategoryDto dto); @Override Category save(Category category); @Override List<Category> findAll(); @Override Category findById(Long id); @Override Category update(Long id, Category category); @Override Long deleteById(Long id); @Override Category findByName(String name); @Override List<CategoryDto> findAllCategoryDto(); }
CategoryServiceImpl implements CategoryService { @Override public List<Category> findAll() { log.info(LogMessage.IN_FIND_ALL); return categoryRepo.findAll(); }  @Override Category save(CategoryDto dto); @Override Category save(Category category); @Override List<Category> findAll(); @Override Category findById(Long id); @Override Category update(Long id, Category category); @Override Long deleteById(Long id); @Override Category findByName(String name); @Override List<CategoryDto> findAllCategoryDto();  }