@Test public void shouldGetById() { service.getById(1L); verify(repository).getById(1L); }
public Product getById(Long id) { return repository.getById(id); }
ProductService { public Product getById(Long id) { return repository.getById(id); } }
ProductService { public Product getById(Long id) { return repository.getById(id); }  }
ProductService { public Product getById(Long id) { return repository.getById(id); }  @Transactional void save(Product product); Long getIdForCode(String code); Product getByCode(String code); boolean isActive(String code); Integer getTotalSearchResultCount(String searchParam); List<DosageUnit> getAllDosageUnits(); Product getById(Long id); }
ProductService { public Product getById(Long id) { return repository.getById(id); }  @Transactional void save(Product product); Long getIdForCode(String code); Product getByCode(String code); boolean isActive(String code); Integer getTotalSearchResultCount(String searchParam); List<DosageUnit> getAllDosageUnits(); Product getById(Long id);  }