@Override
 public void close() throws ItemStreamException {
   // close is called after step processing, after StepExecutionListener execution,
   // that's why we don't see these counters in the log.
   businessMetrics.increment(MetricNames.STREAM_CLOSE_COUNT.getName());
   businessMetrics.submit(MetricNames.STREAM_CLOSE_GAUGE.getName(), 5);
   delegate.close();
 }
 @Override
 public Item read()
     throws Exception, UnexpectedInputException, ParseException, NonTransientResourceException {
   if (readerTransactional) {
     businessMetrics.increment(MetricNames.READ_COUNT.getName());
     businessMetrics.submit(MetricNames.READ_GAUGE.getName(), 5);
   } else {
     businessMetrics.incrementNonTransactional(MetricNames.READ_COUNT.getName());
     businessMetrics.submitNonTransactional(MetricNames.READ_GAUGE.getName(), 5);
   }
   Item item = delegate.read();
   if (item != null && item.getActions().contains(Action.FAIL_ON_READ)) {
     throw new MetricsTestException(Action.FAIL_ON_READ);
   }
   log.debug("Read item: " + item);
   return item;
 }
 @Override
 public void update(ExecutionContext executionContext) throws ItemStreamException {
   businessMetrics.increment(MetricNames.STREAM_UPDATE_COUNT.getName());
   businessMetrics.submit(MetricNames.STREAM_UPDATE_GAUGE.getName(), 5);
   delegate.update(executionContext);
 }