@Override
    public ComputeNode getWorkerById(long workerId) {
        return availableID2ComputeNode.get(workerId);
    }
@Test
    public void testCaptureAvailableWorkers() {
        long deadBEId = 1L;
        long deadCNId = 11L;
        long inBlacklistBEId = 3L;
        long inBlacklistCNId = 13L;

        HostBlacklist blockList = SimpleScheduler.getHostBlacklist();

        blockList.add(inBlacklistBEId);
        blockList.add(inBlacklistCNId);
        id2Backend.get(deadBEId).setAlive(false);
        id2ComputeNode.get(deadCNId).setAlive(false);

        Set<Long> nonAvailableWorkerId = ImmutableSet.of(deadBEId, deadCNId, inBlacklistBEId, inBlacklistCNId);
        WorkerProvider workerProvider = newWorkerProvider();

        Optional<Long> maxId = id2Backend.keySet().stream().max(Comparator.naturalOrder());
        Assert.assertFalse(maxId.isEmpty());
        for (long id : id2AllNodes.keySet()) {
            ComputeNode worker = workerProvider.getWorkerById(id);
            if (nonAvailableWorkerId.contains(id)) {
                Assert.assertNull(worker);
            } else {
                Assert.assertEquals(id, worker.getId());
                if (id <= maxId.get()) {
                    Assert.assertTrue(worker instanceof Backend);
                } else {
                    Assert.assertFalse(worker instanceof Backend);
                }
            }
        }
    }