@Test public void shouldGetProgramForDeliveryZoneBasedOnUserRights() throws Exception { service.getActiveProgramsForDeliveryZone(1l); verify(repository).getPrograms(1l); }
public List<Program> getActiveProgramsForDeliveryZone(long zoneId) { List<Program> programs = repository.getPrograms(zoneId); return fillActivePrograms(programs); }
DeliveryZoneService { public List<Program> getActiveProgramsForDeliveryZone(long zoneId) { List<Program> programs = repository.getPrograms(zoneId); return fillActivePrograms(programs); } }
DeliveryZoneService { public List<Program> getActiveProgramsForDeliveryZone(long zoneId) { List<Program> programs = repository.getPrograms(zoneId); return fillActivePrograms(programs); }  }
DeliveryZoneService { public List<Program> getActiveProgramsForDeliveryZone(long zoneId) { List<Program> programs = repository.getPrograms(zoneId); return fillActivePrograms(programs); }  void save(DeliveryZone zone); DeliveryZone getByCode(String code); List<DeliveryZone> getByUserForRight(long userId, String rightName); List<Program> getActiveProgramsForDeliveryZone(long zoneId); DeliveryZone getById(Long id); List<DeliveryZone> getAll(); List<Program> getAllProgramsForDeliveryZone(Long zoneId); }
DeliveryZoneService { public List<Program> getActiveProgramsForDeliveryZone(long zoneId) { List<Program> programs = repository.getPrograms(zoneId); return fillActivePrograms(programs); }  void save(DeliveryZone zone); DeliveryZone getByCode(String code); List<DeliveryZone> getByUserForRight(long userId, String rightName); List<Program> getActiveProgramsForDeliveryZone(long zoneId); DeliveryZone getById(Long id); List<DeliveryZone> getAll(); List<Program> getAllProgramsForDeliveryZone(Long zoneId);  }