### Question:
FlowableJobExecutorInformation { public int getCurrentJobExecutorQueueSize() { if (lastUpdateTime == null || isPastCacheTimeout()) { updateCurrentJobExecutorQueueSize(); } return currentJobExecutorQueueSize; } @Inject  FlowableJobExecutorInformation(DefaultAsyncJobExecutor jobExecutor); int getCurrentJobExecutorQueueSize();  }### Answer:
@Test void testGetCurrentJobExecutorQueueSize() { prepareJobExecutor(JOBS_IN_QUEUE); int currentJobExecutorQueueSize = flowableJobExecutorInformation.getCurrentJobExecutorQueueSize(); assertEquals(JOBS_IN_QUEUE, currentJobExecutorQueueSize); }
@Test void testGetCurrentJobExecutorQueueSizeFromCache() { prepareJobExecutor(JOBS_IN_QUEUE); flowableJobExecutorInformation.getCurrentJobExecutorQueueSize(); prepareJobExecutor(UPDATED_JOBS_IN_QUEUE); int currentJobExecutorQueueSize = flowableJobExecutorInformation.getCurrentJobExecutorQueueSize(); assertEquals(JOBS_IN_QUEUE, currentJobExecutorQueueSize); }
@Test void testGetCurrentJobExecutorQueueSizeExpiredCache() { flowableJobExecutorInformation = new FlowableJobExecutorInformation(asyncExecutor) { @Override protected void updateTime() { lastUpdateTime = Instant.now() .minusSeconds(120); } }; prepareJobExecutor(JOBS_IN_QUEUE); flowableJobExecutorInformation.getCurrentJobExecutorQueueSize(); prepareJobExecutor(UPDATED_JOBS_IN_QUEUE); int currentJobExecutorQueueSize = flowableJobExecutorInformation.getCurrentJobExecutorQueueSize(); assertEquals(UPDATED_JOBS_IN_QUEUE, currentJobExecutorQueueSize); }