### Question:
ExecutorManager { public boolean pullMemTask() { List<ExecutorTask> memTasks = MemoryQueue.getInstance().pullBeforeTime(System.currentTimeMillis()); return addTasks(memTasks); } private  ExecutorManager(); static ExecutorManager getInstance(); boolean pullMemTask(); boolean pullDBTask(); void clearTasks();  }### Answer:
@Test public void testPullMemTask() { Mockito.when(memoryQueue.pullBeforeTime(Mockito.anyLong())).thenReturn(Collections.singletonList(executorTask2)); ExecutorManager.getInstance().pullMemTask(); Assert.assertEquals(TaskRouter.getInstance().getIdleTasks().size(), 1); TaskRouter.getInstance().remove(executorTask2); }