@Test public void shouldGetProgramForDeliveryZoneBasedOnUserRights() throws Exception { List<Program> programs = new ArrayList<>(); when(mapper.getPrograms(1l)).thenReturn(programs); List<Program> returnedPrograms = repository.getPrograms(1l); verify(mapper).getPrograms(1l); assertThat(returnedPrograms, is(programs)); }
public List<Program> getPrograms(Long id) { return mapper.getPrograms(id); }
DeliveryZoneRepository { public List<Program> getPrograms(Long id) { return mapper.getPrograms(id); } }
DeliveryZoneRepository { public List<Program> getPrograms(Long id) { return mapper.getPrograms(id); }  }
DeliveryZoneRepository { public List<Program> getPrograms(Long id) { return mapper.getPrograms(id); }  void insert(DeliveryZone zone); void update(DeliveryZone zone); DeliveryZone getByCode(String code); List<DeliveryZone> getByUserForRight(Long userId, String rightName); List<Program> getPrograms(Long id); DeliveryZone getById(Long id); List<DeliveryZone> getAll(); }
DeliveryZoneRepository { public List<Program> getPrograms(Long id) { return mapper.getPrograms(id); }  void insert(DeliveryZone zone); void update(DeliveryZone zone); DeliveryZone getByCode(String code); List<DeliveryZone> getByUserForRight(Long userId, String rightName); List<Program> getPrograms(Long id); DeliveryZone getById(Long id); List<DeliveryZone> getAll();  }