### Question:
MemoryRevokingScheduler { @VisibleForTesting void registerPoolListeners() { memoryPools.forEach(memoryPool -> memoryPool.addListener(memoryPoolListener)); } @Inject  MemoryRevokingScheduler(
            LocalMemoryManager localMemoryManager,
            SqlTaskManager sqlTaskManager,
            TaskManagementExecutor taskManagementExecutor,
            FeaturesConfig config); @VisibleForTesting  MemoryRevokingScheduler(
            List<MemoryPool> memoryPools,
            Supplier<? extends Collection<SqlTask>> currentTasksSupplier,
            ScheduledExecutorService taskManagementExecutor,
            double memoryRevokingThreshold,
            double memoryRevokingTarget); @PostConstruct void start(); @PreDestroy void stop();  }### Answer:
@Test public void testImmediateMemoryRevoking() throws Exception { SqlTask sqlTask = newSqlTask(); OperatorContext operatorContext = createContexts(sqlTask); allOperatorContexts = ImmutableSet.of(operatorContext); List<SqlTask> tasks = ImmutableList.of(sqlTask); MemoryRevokingScheduler scheduler = new MemoryRevokingScheduler(singletonList(memoryPool), () -> tasks, executor, 1.0, 1.0); scheduler.registerPoolListeners(); operatorContext.localRevocableMemoryContext().setBytes(12); awaitAsynchronousCallbacksRun(); assertMemoryRevokingRequestedFor(operatorContext); }