### Question:
HiveORCAccessor extends HiveAccessor implements StatsAccessor { @Override public OneRow emitAggObject() { if (!statsInitialized) { throw new IllegalStateException("retrieveStats() should be called before calling emitAggObject()"); } OneRow row = null; if (context.getAggType() == null) throw new UnsupportedOperationException("Aggregate operation is required"); if (context.getAggType() != EnumAggregationType.COUNT) throw new UnsupportedOperationException("Aggregation operation is not supported."); if (objectsEmitted < count) { objectsEmitted++; row = rowToEmitCount; } return row; } HiveORCAccessor(); @Override void initialize(RequestContext requestContext); @Override boolean openForRead(); @Override void retrieveStats(); @Override OneRow emitAggObject();  }### Answer:
@Test(expected = IllegalStateException.class) public void emitAggObjectCountStatsNotInitialized() { accessor.emitAggObject(); }