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