@Test public void testSearch() { List<TaxHeadMaster> taxHeadMasters = new ArrayList<>(); taxHeadMasters.add(getTaxHeadMaster()); TaxHeadMasterResponse taxHeadMasterResponse = new TaxHeadMasterResponse(); taxHeadMasterResponse.setTaxHeadMasters(taxHeadMasters); List<TaxPeriod> taxPeriods = new ArrayList<>(); taxPeriods.add(getTaxPeriod()); TaxPeriodResponse taxPeriodResponse = new TaxPeriodResponse(); taxPeriodResponse.setTaxPeriods(taxPeriods); taxPeriodResponse.setResponseInfo(new ResponseInfo()); when(taxHeadMasterRepository.findForCriteria(Matchers.any(TaxHeadMasterCriteria.class))) .thenReturn(taxHeadMasters); when(taxPeriodService.searchTaxPeriods(Matchers.any(TaxPeriodCriteria.class), Matchers.any(RequestInfo.class))) .thenReturn(taxPeriodResponse); TaxHeadMasterCriteria taxHeadMasterCriteria = TaxHeadMasterCriteria.builder().tenantId("ap.kurnool").build(); assertEquals(taxHeadMasterResponse, taxHeadMasterService.getTaxHeads(taxHeadMasterCriteria, new RequestInfo())); }
public TaxHeadMasterResponse getTaxHeads(TaxHeadMasterCriteria searchTaxHead, RequestInfo requestInfo) { log.info("TaxHeadMasterService getTaxHeads"); List<TaxHeadMaster> taxHeadMaster = taxHeadMasterRepository.getTaxHeadMaster(requestInfo,searchTaxHead); return getTaxHeadMasterResponse(taxHeadMaster, requestInfo); }
TaxHeadMasterService { public TaxHeadMasterResponse getTaxHeads(TaxHeadMasterCriteria searchTaxHead, RequestInfo requestInfo) { log.info("TaxHeadMasterService getTaxHeads"); List<TaxHeadMaster> taxHeadMaster = taxHeadMasterRepository.getTaxHeadMaster(requestInfo,searchTaxHead); return getTaxHeadMasterResponse(taxHeadMaster, requestInfo); } }
TaxHeadMasterService { public TaxHeadMasterResponse getTaxHeads(TaxHeadMasterCriteria searchTaxHead, RequestInfo requestInfo) { log.info("TaxHeadMasterService getTaxHeads"); List<TaxHeadMaster> taxHeadMaster = taxHeadMasterRepository.getTaxHeadMaster(requestInfo,searchTaxHead); return getTaxHeadMasterResponse(taxHeadMaster, requestInfo); }  }
TaxHeadMasterService { public TaxHeadMasterResponse getTaxHeads(TaxHeadMasterCriteria searchTaxHead, RequestInfo requestInfo) { log.info("TaxHeadMasterService getTaxHeads"); List<TaxHeadMaster> taxHeadMaster = taxHeadMasterRepository.getTaxHeadMaster(requestInfo,searchTaxHead); return getTaxHeadMasterResponse(taxHeadMaster, requestInfo); }  TaxHeadMasterResponse getTaxHeads(TaxHeadMasterCriteria searchTaxHead, RequestInfo requestInfo); TaxHeadMasterResponse create(TaxHeadMasterRequest taxHeadMasterRequest); TaxHeadMasterResponse createAsync(TaxHeadMasterRequest taxHeadMasterRequest); TaxHeadMasterResponse updateAsync(TaxHeadMasterRequest taxHeadMasterRequest); TaxHeadMasterResponse update(TaxHeadMasterRequest taxHeadMasterRequest); }
TaxHeadMasterService { public TaxHeadMasterResponse getTaxHeads(TaxHeadMasterCriteria searchTaxHead, RequestInfo requestInfo) { log.info("TaxHeadMasterService getTaxHeads"); List<TaxHeadMaster> taxHeadMaster = taxHeadMasterRepository.getTaxHeadMaster(requestInfo,searchTaxHead); return getTaxHeadMasterResponse(taxHeadMaster, requestInfo); }  TaxHeadMasterResponse getTaxHeads(TaxHeadMasterCriteria searchTaxHead, RequestInfo requestInfo); TaxHeadMasterResponse create(TaxHeadMasterRequest taxHeadMasterRequest); TaxHeadMasterResponse createAsync(TaxHeadMasterRequest taxHeadMasterRequest); TaxHeadMasterResponse updateAsync(TaxHeadMasterRequest taxHeadMasterRequest); TaxHeadMasterResponse update(TaxHeadMasterRequest taxHeadMasterRequest);  }