@Test public void testProcessHappyPath_NoExceptionHasBeenThrownAndEmployeeIsReturned() throws Exception { when(taxPaymentWebServiceFacade.callTaxService(eq(taxCalculation), any(Callable.class))).thenReturn(taxWebserviceCallResult); TaxWebserviceCallResult taxWebserviceCallResult1 = callWebserviceProcessor.process(taxCalculation); assertThat(taxWebserviceCallResult1.getTaxCalculation().getEmployee()).isEqualTo(employee); }
@Override public TaxWebserviceCallResult process(TaxCalculation taxCalculation) throws Exception { LOG.info("Web service process: " + taxCalculation); RetryTemplate retryTemplate = retryConfig.createRetryTemplate(); Callable<Void> callable = () -> retryTemplate.execute(doWebserviceCallWithRetryCallback(taxCalculation)); TaxWebserviceCallResult taxWebserviceCallResult = taxPaymentWebServiceFacade.callTaxService(taxCalculation, callable); return taxWebserviceCallResult; }
CallWebserviceProcessor implements ItemProcessor<TaxCalculation, TaxWebserviceCallResult> { @Override public TaxWebserviceCallResult process(TaxCalculation taxCalculation) throws Exception { LOG.info("Web service process: " + taxCalculation); RetryTemplate retryTemplate = retryConfig.createRetryTemplate(); Callable<Void> callable = () -> retryTemplate.execute(doWebserviceCallWithRetryCallback(taxCalculation)); TaxWebserviceCallResult taxWebserviceCallResult = taxPaymentWebServiceFacade.callTaxService(taxCalculation, callable); return taxWebserviceCallResult; } }
CallWebserviceProcessor implements ItemProcessor<TaxCalculation, TaxWebserviceCallResult> { @Override public TaxWebserviceCallResult process(TaxCalculation taxCalculation) throws Exception { LOG.info("Web service process: " + taxCalculation); RetryTemplate retryTemplate = retryConfig.createRetryTemplate(); Callable<Void> callable = () -> retryTemplate.execute(doWebserviceCallWithRetryCallback(taxCalculation)); TaxWebserviceCallResult taxWebserviceCallResult = taxPaymentWebServiceFacade.callTaxService(taxCalculation, callable); return taxWebserviceCallResult; }  }
CallWebserviceProcessor implements ItemProcessor<TaxCalculation, TaxWebserviceCallResult> { @Override public TaxWebserviceCallResult process(TaxCalculation taxCalculation) throws Exception { LOG.info("Web service process: " + taxCalculation); RetryTemplate retryTemplate = retryConfig.createRetryTemplate(); Callable<Void> callable = () -> retryTemplate.execute(doWebserviceCallWithRetryCallback(taxCalculation)); TaxWebserviceCallResult taxWebserviceCallResult = taxPaymentWebServiceFacade.callTaxService(taxCalculation, callable); return taxWebserviceCallResult; }  @Override TaxWebserviceCallResult process(TaxCalculation taxCalculation); }
CallWebserviceProcessor implements ItemProcessor<TaxCalculation, TaxWebserviceCallResult> { @Override public TaxWebserviceCallResult process(TaxCalculation taxCalculation) throws Exception { LOG.info("Web service process: " + taxCalculation); RetryTemplate retryTemplate = retryConfig.createRetryTemplate(); Callable<Void> callable = () -> retryTemplate.execute(doWebserviceCallWithRetryCallback(taxCalculation)); TaxWebserviceCallResult taxWebserviceCallResult = taxPaymentWebServiceFacade.callTaxService(taxCalculation, callable); return taxWebserviceCallResult; }  @Override TaxWebserviceCallResult process(TaxCalculation taxCalculation);  }