@Override
    public List<Long> selectAllComputeNodes() {
        List<Long> nodeIds = availableID2ComputeNode.values().stream()
                .map(ComputeNode::getId)
                .collect(Collectors.toList());
        nodeIds.forEach(this::selectWorkerUnchecked);
        return nodeIds;
    }
@Test
    public void testChooseAllComputedNodes() {
        { // empty compute nodes
            WorkerProvider workerProvider =
                    new DefaultSharedDataWorkerProvider(ImmutableMap.of(), ImmutableMap.of());
            Assert.assertTrue(workerProvider.selectAllComputeNodes().isEmpty());
        }

        { // both compute nodes and backend are treated as compute nodes
            WorkerProvider workerProvider =
                    new DefaultSharedDataWorkerProvider(ImmutableMap.copyOf(id2AllNodes),
                            ImmutableMap.copyOf(id2AllNodes));

            List<Long> computeNodeIds = workerProvider.selectAllComputeNodes();
            Assert.assertEquals(id2AllNodes.size(), computeNodeIds.size());
            Set<Long> computeNodeIdSet = new HashSet<>(computeNodeIds);
            for (ComputeNode computeNode : id2AllNodes.values()) {
                Assert.assertTrue(computeNodeIdSet.contains(computeNode.getId()));
                testUsingWorkerHelper(workerProvider, computeNode.getId());
            }
        }
    }