@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); }
public boolean pullMemTask() { List<ExecutorTask> memTasks = MemoryQueue.getInstance().pullBeforeTime(System.currentTimeMillis()); return addTasks(memTasks); }
ExecutorManager { public boolean pullMemTask() { List<ExecutorTask> memTasks = MemoryQueue.getInstance().pullBeforeTime(System.currentTimeMillis()); return addTasks(memTasks); } }
ExecutorManager { public boolean pullMemTask() { List<ExecutorTask> memTasks = MemoryQueue.getInstance().pullBeforeTime(System.currentTimeMillis()); return addTasks(memTasks); } private  ExecutorManager(); }
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(); }
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();  }