@Test public void shouldGetAllDeliveryZones() throws Exception { List<DeliveryZone> deliveryZones = new ArrayList<>(); when(mapper.getAll()).thenReturn(deliveryZones); List<DeliveryZone> returnedZones = repository.getAll(); verify(mapper).getAll(); assertThat(returnedZones, is(deliveryZones)); }
public List<DeliveryZone> getAll() { return mapper.getAll(); }
DeliveryZoneRepository { public List<DeliveryZone> getAll() { return mapper.getAll(); } }
DeliveryZoneRepository { public List<DeliveryZone> getAll() { return mapper.getAll(); }  }
DeliveryZoneRepository { public List<DeliveryZone> getAll() { return mapper.getAll(); }  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<DeliveryZone> getAll() { return mapper.getAll(); }  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();  }