@Test public void shouldUpdateTaxPeriods() { TaxPeriodRequest taxPeriodRequest = new TaxPeriodRequest(); List<TaxPeriod> taxPeriods = new ArrayList<>(); taxPeriods.add(getTaxPeriod()); taxPeriodRequest.setTaxPeriods(taxPeriods); RequestInfo requestInfo = new RequestInfo(); User user = new User(); user.setId(1l); requestInfo.setUserInfo(user); taxPeriodRequest.setRequestInfo(requestInfo); TaxPeriodResponse taxPeriodResponse = new TaxPeriodResponse(); taxPeriodResponse.setResponseInfo(null); taxPeriodResponse.setTaxPeriods(taxPeriods); assertTrue(taxPeriodResponse.equals(taxPeriodService.updateAsync(taxPeriodRequest))); }
public TaxPeriodResponse updateAsync(TaxPeriodRequest taxPeriodRequest) { List<TaxPeriod> taxPeriods = taxPeriodRequest.getTaxPeriods(); String userId = taxPeriodRequest.getRequestInfo().getUserInfo().getId().toString(); Long currEpochDate = new Date().getTime(); AuditDetail auditDetail; kafkaTemplate.send(applicationProperties.getUpdateTaxPeriodTopicName(), taxPeriodRequest); return getTaxPeriodResponse(taxPeriods, taxPeriodRequest.getRequestInfo()); }
TaxPeriodService { public TaxPeriodResponse updateAsync(TaxPeriodRequest taxPeriodRequest) { List<TaxPeriod> taxPeriods = taxPeriodRequest.getTaxPeriods(); String userId = taxPeriodRequest.getRequestInfo().getUserInfo().getId().toString(); Long currEpochDate = new Date().getTime(); AuditDetail auditDetail; kafkaTemplate.send(applicationProperties.getUpdateTaxPeriodTopicName(), taxPeriodRequest); return getTaxPeriodResponse(taxPeriods, taxPeriodRequest.getRequestInfo()); } }
TaxPeriodService { public TaxPeriodResponse updateAsync(TaxPeriodRequest taxPeriodRequest) { List<TaxPeriod> taxPeriods = taxPeriodRequest.getTaxPeriods(); String userId = taxPeriodRequest.getRequestInfo().getUserInfo().getId().toString(); Long currEpochDate = new Date().getTime(); AuditDetail auditDetail; kafkaTemplate.send(applicationProperties.getUpdateTaxPeriodTopicName(), taxPeriodRequest); return getTaxPeriodResponse(taxPeriods, taxPeriodRequest.getRequestInfo()); }  }
TaxPeriodService { public TaxPeriodResponse updateAsync(TaxPeriodRequest taxPeriodRequest) { List<TaxPeriod> taxPeriods = taxPeriodRequest.getTaxPeriods(); String userId = taxPeriodRequest.getRequestInfo().getUserInfo().getId().toString(); Long currEpochDate = new Date().getTime(); AuditDetail auditDetail; kafkaTemplate.send(applicationProperties.getUpdateTaxPeriodTopicName(), taxPeriodRequest); return getTaxPeriodResponse(taxPeriods, taxPeriodRequest.getRequestInfo()); }  TaxPeriodResponse searchTaxPeriods(final TaxPeriodCriteria taxPeriodCriteria, final RequestInfo requestInfo); TaxPeriodResponse create(TaxPeriodRequest taxPeriodRequest); TaxPeriodResponse createAsync(TaxPeriodRequest taxPeriodRequest); TaxPeriodResponse updateAsync(TaxPeriodRequest taxPeriodRequest); TaxPeriodResponse update(TaxPeriodRequest taxPeriodRequest); }
TaxPeriodService { public TaxPeriodResponse updateAsync(TaxPeriodRequest taxPeriodRequest) { List<TaxPeriod> taxPeriods = taxPeriodRequest.getTaxPeriods(); String userId = taxPeriodRequest.getRequestInfo().getUserInfo().getId().toString(); Long currEpochDate = new Date().getTime(); AuditDetail auditDetail; kafkaTemplate.send(applicationProperties.getUpdateTaxPeriodTopicName(), taxPeriodRequest); return getTaxPeriodResponse(taxPeriods, taxPeriodRequest.getRequestInfo()); }  TaxPeriodResponse searchTaxPeriods(final TaxPeriodCriteria taxPeriodCriteria, final RequestInfo requestInfo); TaxPeriodResponse create(TaxPeriodRequest taxPeriodRequest); TaxPeriodResponse createAsync(TaxPeriodRequest taxPeriodRequest); TaxPeriodResponse updateAsync(TaxPeriodRequest taxPeriodRequest); TaxPeriodResponse update(TaxPeriodRequest taxPeriodRequest); static final Logger LOGGER; }