@Test public void shouldGetDeliveryZoneByCode() throws Exception { DeliveryZone zone = new DeliveryZone(); when(mapper.getByCode("code")).thenReturn(zone); DeliveryZone returnedZone = repository.getByCode("code"); verify(mapper).getByCode("code"); assertThat(returnedZone, is(zone)); }
public DeliveryZone getByCode(String code) { return mapper.getByCode(code); }
DeliveryZoneRepository { public DeliveryZone getByCode(String code) { return mapper.getByCode(code); } }
DeliveryZoneRepository { public DeliveryZone getByCode(String code) { return mapper.getByCode(code); }  }
DeliveryZoneRepository { public DeliveryZone getByCode(String code) { return mapper.getByCode(code); }  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 DeliveryZone getByCode(String code) { return mapper.getByCode(code); }  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();  }