@SuppressWarnings({"rawtypes", "unchecked"})

@Test
public void testDelayCollect005() throws Exception {
    final Queueing1NRelationResultHandlerImpl drh = new Queueing1NRelationResultHandlerImpl();
    final DaoCollectorStub004 daoCollector = new DaoCollectorStub004(2);
    drh.setDaoCollector(daoCollector);
    ExecutorService service = Executors.newSingleThreadExecutor();
    ErrorFeedBackRunnable runnable = new ErrorFeedBackRunnable() {
        @Override
        public void doRun() throws Exception {
            drh.prevRow = "hoge1";
            drh.delayCollect();
            drh.prevRow = "hoge2";
            Thread.currentThread().interrupt();
            // 割り込み発生時はdelayCollectは処理されず、スレッドが割り込み状態のままであること。
            drh.delayCollect();
            assertTrue(Thread.currentThread().isInterrupted());
        }
    };
    service.submit(runnable);
    runnable.throwErrorOrExceptionIfThrown();
    // "hoge1"のみキューイングされていること。
    assertEquals(1, daoCollector.getQueue().size());
}