@Test public void shouldGetAll() { service.getAll(); verify(repository).getAll(); }
public List<ProductGroup> getAll() { return repository.getAll(); }
ProductGroupService { public List<ProductGroup> getAll() { return repository.getAll(); } }
ProductGroupService { public List<ProductGroup> getAll() { return repository.getAll(); } @Autowired  ProductGroupService(ProductGroupRepository repository); }
ProductGroupService { public List<ProductGroup> getAll() { return repository.getAll(); } @Autowired  ProductGroupService(ProductGroupRepository repository); void save(ProductGroup productGroup); ProductGroup getByCode(String code); List<ProductGroup> getAll(); ProductGroup validateAndReturn(ProductGroup group); }
ProductGroupService { public List<ProductGroup> getAll() { return repository.getAll(); } @Autowired  ProductGroupService(ProductGroupRepository repository); void save(ProductGroup productGroup); ProductGroup getByCode(String code); List<ProductGroup> getAll(); ProductGroup validateAndReturn(ProductGroup group);  }