@Test(expected=InvalidDataException.class) public final void test_deletete_with_out_kafka_null_id() { final List<BudgetDetail> expextedResult = getBudgetDetails(); expextedResult.get(0).setId(null); when(budgetDetailRepository.delete(any(List.class), any(RequestInfo.class))).thenReturn(expextedResult); final List<BudgetDetail> actualResult = budgetDetailService.delete(expextedResult, errors, requestInfo); assertEquals(expextedResult, actualResult); }
@Transactional public List<BudgetDetail> delete(List<BudgetDetail> budgetDetails, final BindingResult errors, final RequestInfo requestInfo) { try { validate(budgetDetails, ACTION_DELETE, errors); if (errors.hasErrors()) throw new CustomBindException(errors); } catch (final CustomBindException e) { throw new CustomBindException(errors); } return budgetDetailRepository.delete(budgetDetails, requestInfo); }
BudgetDetailService { @Transactional public List<BudgetDetail> delete(List<BudgetDetail> budgetDetails, final BindingResult errors, final RequestInfo requestInfo) { try { validate(budgetDetails, ACTION_DELETE, errors); if (errors.hasErrors()) throw new CustomBindException(errors); } catch (final CustomBindException e) { throw new CustomBindException(errors); } return budgetDetailRepository.delete(budgetDetails, requestInfo); } }
BudgetDetailService { @Transactional public List<BudgetDetail> delete(List<BudgetDetail> budgetDetails, final BindingResult errors, final RequestInfo requestInfo) { try { validate(budgetDetails, ACTION_DELETE, errors); if (errors.hasErrors()) throw new CustomBindException(errors); } catch (final CustomBindException e) { throw new CustomBindException(errors); } return budgetDetailRepository.delete(budgetDetails, requestInfo); }  }
BudgetDetailService { @Transactional public List<BudgetDetail> delete(List<BudgetDetail> budgetDetails, final BindingResult errors, final RequestInfo requestInfo) { try { validate(budgetDetails, ACTION_DELETE, errors); if (errors.hasErrors()) throw new CustomBindException(errors); } catch (final CustomBindException e) { throw new CustomBindException(errors); } return budgetDetailRepository.delete(budgetDetails, requestInfo); }  @Transactional List<BudgetDetail> create(List<BudgetDetail> budgetDetails, final BindingResult errors,
            final RequestInfo requestInfo); @Transactional List<BudgetDetail> update(List<BudgetDetail> budgetDetails, final BindingResult errors,
            final RequestInfo requestInfo); @Transactional List<BudgetDetail> delete(List<BudgetDetail> budgetDetails, final BindingResult errors,
            final RequestInfo requestInfo); List<BudgetDetail> fetchRelated(final List<BudgetDetail> budgetdetails,RequestInfo requestInfo); Pagination<BudgetDetail> search(final BudgetDetailSearch budgetDetailSearch); @Transactional BudgetDetail save(final BudgetDetail budgetDetail); @Transactional BudgetDetail update(final BudgetDetail budgetDetail); @Transactional BudgetDetail delete(final BudgetDetail budgetDetail); }
BudgetDetailService { @Transactional public List<BudgetDetail> delete(List<BudgetDetail> budgetDetails, final BindingResult errors, final RequestInfo requestInfo) { try { validate(budgetDetails, ACTION_DELETE, errors); if (errors.hasErrors()) throw new CustomBindException(errors); } catch (final CustomBindException e) { throw new CustomBindException(errors); } return budgetDetailRepository.delete(budgetDetails, requestInfo); }  @Transactional List<BudgetDetail> create(List<BudgetDetail> budgetDetails, final BindingResult errors,
            final RequestInfo requestInfo); @Transactional List<BudgetDetail> update(List<BudgetDetail> budgetDetails, final BindingResult errors,
            final RequestInfo requestInfo); @Transactional List<BudgetDetail> delete(List<BudgetDetail> budgetDetails, final BindingResult errors,
            final RequestInfo requestInfo); List<BudgetDetail> fetchRelated(final List<BudgetDetail> budgetdetails,RequestInfo requestInfo); Pagination<BudgetDetail> search(final BudgetDetailSearch budgetDetailSearch); @Transactional BudgetDetail save(final BudgetDetail budgetDetail); @Transactional BudgetDetail update(final BudgetDetail budgetDetail); @Transactional BudgetDetail delete(final BudgetDetail budgetDetail); static final String ACTION_CREATE; static final String ACTION_UPDATE; static final String ACTION_DELETE; static final String ACTION_VIEW; static final String ACTION_EDIT; static final String ACTION_SEARCH; }