@Override
    public List<Long> selectAllComputeNodes() {
        if (!usedComputeNode) {
            return Collections.emptyList();
        }

        List<Long> nodeIds = availableID2ComputeNode.values().stream()
                .map(ComputeNode::getId)
                .collect(Collectors.toList());
        nodeIds.forEach(this::selectWorkerUnchecked);

        return nodeIds;
    }
@Test
    public void testChooseAllComputedNodes() {
        DefaultWorkerProvider workerProvider;
        List<Long> computeNodes;

        workerProvider =
                new DefaultWorkerProvider(id2Backend, id2ComputeNode, availableId2Backend, availableId2ComputeNode,
                        false);
        computeNodes = workerProvider.selectAllComputeNodes();
        Assert.assertTrue(computeNodes.isEmpty());

        workerProvider =
                new DefaultWorkerProvider(id2Backend, id2ComputeNode, availableId2Backend, availableId2ComputeNode,
                        true);
        computeNodes = workerProvider.selectAllComputeNodes();
        Assert.assertEquals(availableId2ComputeNode.size(), computeNodes.size());
        Set<Long> computeNodeSet = new HashSet<>(computeNodes);
        for (ComputeNode computeNode : availableId2ComputeNode.values()) {
            Assert.assertTrue(computeNodeSet.contains(computeNode.getId()));

            testUsingWorkerHelper(workerProvider, computeNode.getId());
        }
    }