package be.cegeka.batchers.taxcalculator.batch.config;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.batch.core.JobExecution;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class EmployeeJobExecutionListener implements org.springframework.batch.core.JobExecutionListener {

    private static final Logger LOG = LoggerFactory.getLogger(EmployeeJobExecutionListener.class);

    @Autowired
    private SumOfTaxes sumOfTaxes;

    @Override
    public void beforeJob(JobExecution jobExecution) {
        sumOfTaxes.reset();
    }

    @Override
    public void afterJob(JobExecution jobExecution) {
        LOG.info("\n\nSum of success taxes = {} \n\n ", sumOfTaxes.getSuccessSum());
        LOG.info("\n\nSum of failure taxes = {} \n\n ", sumOfTaxes.getSuccessSum());
    }
}

@@ -860,39 +860,38 @@
 , sumOfTaxes.get
-Success
+Failed
 Sum());%0A    %7D%0A%7D%0A

fix display failed sum in log