### Question:
AsyncProcess { public void waitUntilDone() throws InterruptedIOException { waitForMaximumCurrentTasks(0); } AsyncProcess(HConnection hc, TableName tableName, ExecutorService pool,
      AsyncProcessCallback<CResult> callback, Configuration conf,
      RpcRetryingCallerFactory rpcCaller); void submit(List<? extends Row> rows, boolean atLeastOne); void submitAll(List<? extends Row> rows); void sendMultiAction(final List<Action<Row>> initialActions,
                              Map<HRegionLocation, MultiAction<Row>> actionsByServer,
                              final int numAttempt,
                              final HConnectionManager.ServerErrorTracker errorsByServer); void waitUntilDone(); boolean hasError(); List<? extends Row> getFailedOperations(); void clearErrors(); RetriesExhaustedWithDetailsException getErrors();  }### Answer:
@Test public void testHTableFailedPutAndNewPut() throws Exception { HTable ht = new HTable(); HConnection hc = createHConnection(); MyCB mcb = new MyCB(); ht.ap = new MyAsyncProcess<Object>(hc, mcb, conf); ht.setAutoFlush(false, true); ht.setWriteBufferSize(0); Put p = createPut(1, false); ht.put(p); ht.ap.waitUntilDone(); p = createPut(1, true); Assert.assertEquals(0, ht.writeAsyncBuffer.size()); try { ht.put(p); Assert.fail(); } catch (RetriesExhaustedException expected) { } Assert.assertEquals("the put should not been inserted.", 0, ht.writeAsyncBuffer.size()); }