@Override
    public void selectWorker(long workerId) throws NonRecoverableException {
        if (getWorkerById(workerId) == null) {
            reportWorkerNotFoundException();
        }
        selectWorkerUnchecked(workerId);
    }
@Test
    public void testSelectWorker() throws UserException {
        DefaultWorkerProvider workerProvider =
                new DefaultWorkerProvider(id2Backend, id2ComputeNode, availableId2Backend, availableId2ComputeNode,
                        true);
        for (long id = -1; id < 20; id++) {
            if (availableId2Worker.containsKey(id)) {
                workerProvider.selectWorker(id);
                testUsingWorkerHelper(workerProvider, id);
            } else {
                long finalId = id;
                Assert.assertThrows(NonRecoverableException.class, () -> workerProvider.selectWorker(finalId));
            }
        }
    }