@Test public void shouldGetAllRegimenCategories() { List<RegimenCategory> expectedRegimenCategories = new ArrayList<>(); when(regimenCategoryRepository.getAll()).thenReturn(expectedRegimenCategories); List<RegimenCategory> regimenCategories = service.getAllRegimenCategories(); assertThat(regimenCategories, is(expectedRegimenCategories)); verify(regimenCategoryRepository).getAll(); }
public List<RegimenCategory> getAllRegimenCategories() { return regimenCategoryRepository.getAll(); }
RegimenService { public List<RegimenCategory> getAllRegimenCategories() { return regimenCategoryRepository.getAll(); } }
RegimenService { public List<RegimenCategory> getAllRegimenCategories() { return regimenCategoryRepository.getAll(); }  }
RegimenService { public List<RegimenCategory> getAllRegimenCategories() { return regimenCategoryRepository.getAll(); }  void save(List<Regimen> regimens, Long userId); List<Regimen> getByProgram(Long programId); List<RegimenCategory> getAllRegimenCategories(); Regimen getById(Long id); List<DosageFrequency> getAllDosageFrequencies(); List<RegimenProductCombination> getAllRegimenProductCombinations(); List<RegimenCombinationConstituent> getAllRegimenCombinationConstituents(); List<RegimenConstituentDosage> getAllRegimenConstituentDosages(); }
RegimenService { public List<RegimenCategory> getAllRegimenCategories() { return regimenCategoryRepository.getAll(); }  void save(List<Regimen> regimens, Long userId); List<Regimen> getByProgram(Long programId); List<RegimenCategory> getAllRegimenCategories(); Regimen getById(Long id); List<DosageFrequency> getAllDosageFrequencies(); List<RegimenProductCombination> getAllRegimenProductCombinations(); List<RegimenCombinationConstituent> getAllRegimenCombinationConstituents(); List<RegimenConstituentDosage> getAllRegimenConstituentDosages();  }