@Override
  public boolean closeConnection(StatsCollectionContext scc) {
    if (errorMethod.equalsIgnoreCase("closeConnection")) {
      return false;
    }
    return true;
  }
An test implementation for StatsAggregator.
The method corresponding to the configuration parameter
hive.test.dummystats.aggregator fail, whereas all
other methods succeed.
itests/util/src/main/java/org/apache/hadoop/hive/ql/stats/DummyStatsAggregator.java