@Test public final void testUpdate() { when(accountDetailTypeRepository.findById(any(AccountDetailType.class))).thenReturn(getAccountDetaialType()); when(accountEntityRepository.uniqueCheck(any(String.class), any(AccountEntity.class))).thenReturn(true); accountEntityService.update(getAccountEntitys(), errors, requestInfo); }
@Transactional public List<AccountEntity> update(List<AccountEntity> accountEntities, BindingResult errors, RequestInfo requestInfo) { try { accountEntities = fetchRelated(accountEntities); validate(accountEntities, Constants.ACTION_UPDATE, errors); if (errors.hasErrors()) { throw new CustomBindException(errors); } } catch (CustomBindException e) { throw new CustomBindException(errors); } return accountEntityRepository.update(accountEntities, requestInfo); }
AccountEntityService { @Transactional public List<AccountEntity> update(List<AccountEntity> accountEntities, BindingResult errors, RequestInfo requestInfo) { try { accountEntities = fetchRelated(accountEntities); validate(accountEntities, Constants.ACTION_UPDATE, errors); if (errors.hasErrors()) { throw new CustomBindException(errors); } } catch (CustomBindException e) { throw new CustomBindException(errors); } return accountEntityRepository.update(accountEntities, requestInfo); } }
AccountEntityService { @Transactional public List<AccountEntity> update(List<AccountEntity> accountEntities, BindingResult errors, RequestInfo requestInfo) { try { accountEntities = fetchRelated(accountEntities); validate(accountEntities, Constants.ACTION_UPDATE, errors); if (errors.hasErrors()) { throw new CustomBindException(errors); } } catch (CustomBindException e) { throw new CustomBindException(errors); } return accountEntityRepository.update(accountEntities, requestInfo); }  }
AccountEntityService { @Transactional public List<AccountEntity> update(List<AccountEntity> accountEntities, BindingResult errors, RequestInfo requestInfo) { try { accountEntities = fetchRelated(accountEntities); validate(accountEntities, Constants.ACTION_UPDATE, errors); if (errors.hasErrors()) { throw new CustomBindException(errors); } } catch (CustomBindException e) { throw new CustomBindException(errors); } return accountEntityRepository.update(accountEntities, requestInfo); }  @Transactional List<AccountEntity> create(List<AccountEntity> accountEntities, BindingResult errors, RequestInfo requestInfo); @Transactional List<AccountEntity> update(List<AccountEntity> accountEntities, BindingResult errors, RequestInfo requestInfo); List<AccountEntity> fetchRelated(List<AccountEntity> accountentities); @Transactional List<AccountEntity> add(List<AccountEntity> accountentities, BindingResult errors); @Transactional List<AccountEntity> update(List<AccountEntity> accountentities, BindingResult errors); void addToQue(AccountEntityRequest request); Pagination<AccountEntity> search(AccountEntitySearch accountEntitySearch, BindingResult errors); @Transactional AccountEntity save(AccountEntity accountEntity); @Transactional AccountEntity update(AccountEntity accountEntity); }
AccountEntityService { @Transactional public List<AccountEntity> update(List<AccountEntity> accountEntities, BindingResult errors, RequestInfo requestInfo) { try { accountEntities = fetchRelated(accountEntities); validate(accountEntities, Constants.ACTION_UPDATE, errors); if (errors.hasErrors()) { throw new CustomBindException(errors); } } catch (CustomBindException e) { throw new CustomBindException(errors); } return accountEntityRepository.update(accountEntities, requestInfo); }  @Transactional List<AccountEntity> create(List<AccountEntity> accountEntities, BindingResult errors, RequestInfo requestInfo); @Transactional List<AccountEntity> update(List<AccountEntity> accountEntities, BindingResult errors, RequestInfo requestInfo); List<AccountEntity> fetchRelated(List<AccountEntity> accountentities); @Transactional List<AccountEntity> add(List<AccountEntity> accountentities, BindingResult errors); @Transactional List<AccountEntity> update(List<AccountEntity> accountentities, BindingResult errors); void addToQue(AccountEntityRequest request); Pagination<AccountEntity> search(AccountEntitySearch accountEntitySearch, BindingResult errors); @Transactional AccountEntity save(AccountEntity accountEntity); @Transactional AccountEntity update(AccountEntity accountEntity);  }