@Test public final void testUpdate() { banks.add(getBank()); when(bankRepository.uniqueCheck(any(String.class), any(Bank.class))).thenReturn(true); bankService.update(banks, errors, requestInfo); }
@Transactional public List<Bank> update(List<Bank> banks, BindingResult errors, RequestInfo requestInfo) { try { banks = fetchRelated(banks); validate(banks, Constants.ACTION_UPDATE, errors); if (errors.hasErrors()) { throw new CustomBindException(errors); } } catch (CustomBindException e) { throw new CustomBindException(errors); } return bankRepository.update(banks, requestInfo); }
BankService { @Transactional public List<Bank> update(List<Bank> banks, BindingResult errors, RequestInfo requestInfo) { try { banks = fetchRelated(banks); validate(banks, Constants.ACTION_UPDATE, errors); if (errors.hasErrors()) { throw new CustomBindException(errors); } } catch (CustomBindException e) { throw new CustomBindException(errors); } return bankRepository.update(banks, requestInfo); } }
BankService { @Transactional public List<Bank> update(List<Bank> banks, BindingResult errors, RequestInfo requestInfo) { try { banks = fetchRelated(banks); validate(banks, Constants.ACTION_UPDATE, errors); if (errors.hasErrors()) { throw new CustomBindException(errors); } } catch (CustomBindException e) { throw new CustomBindException(errors); } return bankRepository.update(banks, requestInfo); }  }
BankService { @Transactional public List<Bank> update(List<Bank> banks, BindingResult errors, RequestInfo requestInfo) { try { banks = fetchRelated(banks); validate(banks, Constants.ACTION_UPDATE, errors); if (errors.hasErrors()) { throw new CustomBindException(errors); } } catch (CustomBindException e) { throw new CustomBindException(errors); } return bankRepository.update(banks, requestInfo); }  @Transactional List<Bank> create(List<Bank> banks, BindingResult errors, RequestInfo requestInfo); @Transactional List<Bank> update(List<Bank> banks, BindingResult errors, RequestInfo requestInfo); List<Bank> fetchRelated(List<Bank> banks); @Transactional List<Bank> update(List<Bank> banks, BindingResult errors); Pagination<Bank> search(BankSearch bankSearch, BindingResult errors); @Transactional Bank save(Bank bank); @Transactional Bank update(Bank bank); }
BankService { @Transactional public List<Bank> update(List<Bank> banks, BindingResult errors, RequestInfo requestInfo) { try { banks = fetchRelated(banks); validate(banks, Constants.ACTION_UPDATE, errors); if (errors.hasErrors()) { throw new CustomBindException(errors); } } catch (CustomBindException e) { throw new CustomBindException(errors); } return bankRepository.update(banks, requestInfo); }  @Transactional List<Bank> create(List<Bank> banks, BindingResult errors, RequestInfo requestInfo); @Transactional List<Bank> update(List<Bank> banks, BindingResult errors, RequestInfo requestInfo); List<Bank> fetchRelated(List<Bank> banks); @Transactional List<Bank> update(List<Bank> banks, BindingResult errors); Pagination<Bank> search(BankSearch bankSearch, BindingResult errors); @Transactional Bank save(Bank bank); @Transactional Bank update(Bank bank);  }