@Test public void shouldGetByCode() { service.getByCode("code"); verify(repository).getByCode("code"); }
public Product getByCode(String code) { return repository.getByCode(code); }
ProductService { public Product getByCode(String code) { return repository.getByCode(code); } }
ProductService { public Product getByCode(String code) { return repository.getByCode(code); }  }
ProductService { public Product getByCode(String code) { return repository.getByCode(code); }  @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 getByCode(String code) { return repository.getByCode(code); }  @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);  }