@Override
    public int getRemainingQueueCapacity() {
        return taskQ.remainingCapacity();
    }
@Test
    public void getRemainingQueueCapacity_whenTaskSubmitted() {
        int queueSize = 10;
        ManagedExecutorService executorService = newManagedExecutorService(1, queueSize);

        CountDownLatch finishLatch = startLongRunningTask(executorService);
        try {
            executeNopTask(executorService);
            assertEquals(queueSize - 1, executorService.getRemainingQueueCapacity());
        } finally {
            finishLatch.countDown();
        }
    }