AccumuloEventStorageBolt extends AccumuloBaseBolt { void resetEventWriter() { try { if (eventWriter != null) { cleanupEventWriter(); } eventWriter = conn.createBatchWriter(eventTable, config); } catch (TableNotFoundException e) { logger.error("Table not found", e); throw new PrepareFailedException("Table not found", e); } }  @Override void cleanup(); static final String EVENT_TABLE; static final String UUID_PREFIX; static final String UUID_PREFIX_DEFAULT; static final String VISIBILITY; static final String VISIBILITY_BY_FIELD; static final String SPLITS; static final int SPLITS_DEFAULT; }
@Test public void testResetEventWriter( @Injectable BatchWriter eventWriter, @Injectable Connector connector, @Injectable String tableName, @Injectable BatchWriterConfig batchWriterConfig) throws TableNotFoundException { bolt.eventWriter = null; bolt.conn = connector; bolt.eventTable = tableName; bolt.config = batchWriterConfig; new Expectations(bolt) {{ connector.createBatchWriter(tableName, batchWriterConfig); result = eventWriter; }}; bolt.resetEventWriter(); }