@Test public void testPullDBTask() { Mockito.when(DBQueue.getInstance().pullAll()).thenReturn(Collections.singletonList(executorTask1)); ExecutorManager.getInstance().pullDBTask(); Assert.assertEquals(TaskRouter.getInstance().getIdleTasks().size(), 1); TaskRouter.getInstance().remove(executorTask1); }
public boolean pullDBTask() { List<ExecutorTask> dbTasks = DBQueue.getInstance().pullAll(); return addTasks(dbTasks); }
ExecutorManager { public boolean pullDBTask() { List<ExecutorTask> dbTasks = DBQueue.getInstance().pullAll(); return addTasks(dbTasks); } }
ExecutorManager { public boolean pullDBTask() { List<ExecutorTask> dbTasks = DBQueue.getInstance().pullAll(); return addTasks(dbTasks); } private  ExecutorManager(); }
ExecutorManager { public boolean pullDBTask() { List<ExecutorTask> dbTasks = DBQueue.getInstance().pullAll(); return addTasks(dbTasks); } private  ExecutorManager(); static ExecutorManager getInstance(); boolean pullMemTask(); boolean pullDBTask(); void clearTasks(); }
ExecutorManager { public boolean pullDBTask() { List<ExecutorTask> dbTasks = DBQueue.getInstance().pullAll(); return addTasks(dbTasks); } private  ExecutorManager(); static ExecutorManager getInstance(); boolean pullMemTask(); boolean pullDBTask(); void clearTasks();  }