@Test public final void testUpdate() { accountCodePurposes.add(getAccountCodePurpose()); when(accountCodePurposeRepository.uniqueCheck(any(String.class), any(AccountCodePurpose.class))) .thenReturn(true); accountCodePurposeService.update(accountCodePurposes, errors, requestInfo); }
@Transactional public List<AccountCodePurpose> update(List<AccountCodePurpose> accountCodePurposes, BindingResult errors, RequestInfo requestInfo) { try { accountCodePurposes = fetchRelated(accountCodePurposes); validate(accountCodePurposes, Constants.ACTION_UPDATE, errors); if (errors.hasErrors()) { throw new CustomBindException(errors); } } catch (CustomBindException e) { throw new CustomBindException(errors); } return accountCodePurposeRepository.update(accountCodePurposes, requestInfo); }
AccountCodePurposeService { @Transactional public List<AccountCodePurpose> update(List<AccountCodePurpose> accountCodePurposes, BindingResult errors, RequestInfo requestInfo) { try { accountCodePurposes = fetchRelated(accountCodePurposes); validate(accountCodePurposes, Constants.ACTION_UPDATE, errors); if (errors.hasErrors()) { throw new CustomBindException(errors); } } catch (CustomBindException e) { throw new CustomBindException(errors); } return accountCodePurposeRepository.update(accountCodePurposes, requestInfo); } }
AccountCodePurposeService { @Transactional public List<AccountCodePurpose> update(List<AccountCodePurpose> accountCodePurposes, BindingResult errors, RequestInfo requestInfo) { try { accountCodePurposes = fetchRelated(accountCodePurposes); validate(accountCodePurposes, Constants.ACTION_UPDATE, errors); if (errors.hasErrors()) { throw new CustomBindException(errors); } } catch (CustomBindException e) { throw new CustomBindException(errors); } return accountCodePurposeRepository.update(accountCodePurposes, requestInfo); }  }
AccountCodePurposeService { @Transactional public List<AccountCodePurpose> update(List<AccountCodePurpose> accountCodePurposes, BindingResult errors, RequestInfo requestInfo) { try { accountCodePurposes = fetchRelated(accountCodePurposes); validate(accountCodePurposes, Constants.ACTION_UPDATE, errors); if (errors.hasErrors()) { throw new CustomBindException(errors); } } catch (CustomBindException e) { throw new CustomBindException(errors); } return accountCodePurposeRepository.update(accountCodePurposes, requestInfo); }  @Transactional List<AccountCodePurpose> create(List<AccountCodePurpose> accountCodePurposes, BindingResult errors,
			RequestInfo requestInfo); @Transactional List<AccountCodePurpose> update(List<AccountCodePurpose> accountCodePurposes, BindingResult errors,
			RequestInfo requestInfo); List<AccountCodePurpose> fetchRelated(List<AccountCodePurpose> accountcodepurposes); @Transactional List<AccountCodePurpose> add(List<AccountCodePurpose> accountcodepurposes, BindingResult errors); @Transactional List<AccountCodePurpose> update(List<AccountCodePurpose> accountcodepurposes, BindingResult errors); void addToQue(AccountCodePurposeRequest request); Pagination<AccountCodePurpose> search(AccountCodePurposeSearch accountCodePurposeSearch,
			BindingResult errors); @Transactional AccountCodePurpose save(AccountCodePurpose accountCodePurpose); @Transactional AccountCodePurpose update(AccountCodePurpose accountCodePurpose); }
AccountCodePurposeService { @Transactional public List<AccountCodePurpose> update(List<AccountCodePurpose> accountCodePurposes, BindingResult errors, RequestInfo requestInfo) { try { accountCodePurposes = fetchRelated(accountCodePurposes); validate(accountCodePurposes, Constants.ACTION_UPDATE, errors); if (errors.hasErrors()) { throw new CustomBindException(errors); } } catch (CustomBindException e) { throw new CustomBindException(errors); } return accountCodePurposeRepository.update(accountCodePurposes, requestInfo); }  @Transactional List<AccountCodePurpose> create(List<AccountCodePurpose> accountCodePurposes, BindingResult errors,
			RequestInfo requestInfo); @Transactional List<AccountCodePurpose> update(List<AccountCodePurpose> accountCodePurposes, BindingResult errors,
			RequestInfo requestInfo); List<AccountCodePurpose> fetchRelated(List<AccountCodePurpose> accountcodepurposes); @Transactional List<AccountCodePurpose> add(List<AccountCodePurpose> accountcodepurposes, BindingResult errors); @Transactional List<AccountCodePurpose> update(List<AccountCodePurpose> accountcodepurposes, BindingResult errors); void addToQue(AccountCodePurposeRequest request); Pagination<AccountCodePurpose> search(AccountCodePurposeSearch accountCodePurposeSearch,
			BindingResult errors); @Transactional AccountCodePurpose save(AccountCodePurpose accountCodePurpose); @Transactional AccountCodePurpose update(AccountCodePurpose accountCodePurpose);  }