@Test public final void test_delete_with_out_kafka() { List<InstrumentType> expextedResult = getInstrumentTypes(); when(instrumentTypeRepository.delete(any(List.class), any(RequestInfo.class))).thenReturn(expextedResult); List<InstrumentType> actualResult = instrumentTypeService.delete(expextedResult, errors, requestInfo); assertEquals(expextedResult, actualResult); }
@Transactional public List<InstrumentType> delete(List<InstrumentType> instrumentTypes, BindingResult errors, RequestInfo requestInfo) { try { validate(instrumentTypes, ACTION_DELETE, errors); if (errors.hasErrors()) throw new CustomBindException(errors); } catch (CustomBindException e) { throw new CustomBindException(errors); } return instrumentTypeRepository.delete(instrumentTypes, requestInfo); }
InstrumentTypeService { @Transactional public List<InstrumentType> delete(List<InstrumentType> instrumentTypes, BindingResult errors, RequestInfo requestInfo) { try { validate(instrumentTypes, ACTION_DELETE, errors); if (errors.hasErrors()) throw new CustomBindException(errors); } catch (CustomBindException e) { throw new CustomBindException(errors); } return instrumentTypeRepository.delete(instrumentTypes, requestInfo); } }
InstrumentTypeService { @Transactional public List<InstrumentType> delete(List<InstrumentType> instrumentTypes, BindingResult errors, RequestInfo requestInfo) { try { validate(instrumentTypes, ACTION_DELETE, errors); if (errors.hasErrors()) throw new CustomBindException(errors); } catch (CustomBindException e) { throw new CustomBindException(errors); } return instrumentTypeRepository.delete(instrumentTypes, requestInfo); } @Autowired  InstrumentTypeService(SmartValidator validator, InstrumentTypeRepository instrumentTypeRepository); }
InstrumentTypeService { @Transactional public List<InstrumentType> delete(List<InstrumentType> instrumentTypes, BindingResult errors, RequestInfo requestInfo) { try { validate(instrumentTypes, ACTION_DELETE, errors); if (errors.hasErrors()) throw new CustomBindException(errors); } catch (CustomBindException e) { throw new CustomBindException(errors); } return instrumentTypeRepository.delete(instrumentTypes, requestInfo); } @Autowired  InstrumentTypeService(SmartValidator validator, InstrumentTypeRepository instrumentTypeRepository); @Transactional List<InstrumentType> create(List<InstrumentType> instrumentTypes, BindingResult errors,
            RequestInfo requestInfo); @Transactional List<InstrumentType> update(List<InstrumentType> instrumentTypes, BindingResult errors,
            RequestInfo requestInfo); @Transactional List<InstrumentType> delete(List<InstrumentType> instrumentTypes, BindingResult errors,
            RequestInfo requestInfo); @Transactional InstrumentType delete(InstrumentType instrumentType); List<InstrumentType> fetchRelated(List<InstrumentType> instrumenttypes); Pagination<InstrumentType> search(InstrumentTypeSearch instrumentTypeSearch); @Transactional InstrumentType save(InstrumentType instrumentType); @Transactional InstrumentType update(InstrumentType instrumentType); }
InstrumentTypeService { @Transactional public List<InstrumentType> delete(List<InstrumentType> instrumentTypes, BindingResult errors, RequestInfo requestInfo) { try { validate(instrumentTypes, ACTION_DELETE, errors); if (errors.hasErrors()) throw new CustomBindException(errors); } catch (CustomBindException e) { throw new CustomBindException(errors); } return instrumentTypeRepository.delete(instrumentTypes, requestInfo); } @Autowired  InstrumentTypeService(SmartValidator validator, InstrumentTypeRepository instrumentTypeRepository); @Transactional List<InstrumentType> create(List<InstrumentType> instrumentTypes, BindingResult errors,
            RequestInfo requestInfo); @Transactional List<InstrumentType> update(List<InstrumentType> instrumentTypes, BindingResult errors,
            RequestInfo requestInfo); @Transactional List<InstrumentType> delete(List<InstrumentType> instrumentTypes, BindingResult errors,
            RequestInfo requestInfo); @Transactional InstrumentType delete(InstrumentType instrumentType); List<InstrumentType> fetchRelated(List<InstrumentType> instrumenttypes); Pagination<InstrumentType> search(InstrumentTypeSearch instrumentTypeSearch); @Transactional InstrumentType save(InstrumentType instrumentType); @Transactional InstrumentType update(InstrumentType instrumentType); 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; }