@Test public void shouldRemoveVendor() throws Exception { service.removeVendor(20L); verify(repository).remove(20L); }
public void removeVendor(Long id) { try { repository.remove(id); } catch (DataIntegrityViolationException ex) { throw (ex); } }
VendorService { public void removeVendor(Long id) { try { repository.remove(id); } catch (DataIntegrityViolationException ex) { throw (ex); } } }
VendorService { public void removeVendor(Long id) { try { repository.remove(id); } catch (DataIntegrityViolationException ex) { throw (ex); } }  }
VendorService { public void removeVendor(Long id) { try { repository.remove(id); } catch (DataIntegrityViolationException ex) { throw (ex); } }  List<Vendor> getAll(); Vendor getById(Long id); void save(Vendor vendor); void removeVendor(Long id); }
VendorService { public void removeVendor(Long id) { try { repository.remove(id); } catch (DataIntegrityViolationException ex) { throw (ex); } }  List<Vendor> getAll(); Vendor getById(Long id); void save(Vendor vendor); void removeVendor(Long id);  }