public static List<Node> selectNodes(String searchPath, SearchGroups cluster) {
        Optional<SearchPath> sp = SearchPath.fromString(searchPath);
        if (sp.isPresent()) {
            return sp.get().mapToNodes(cluster);
        } else {
            return List.of();
        }
    }
@Test
    void searchPathMustFilterNodesBasedOnDefinition() {
        SearchGroups cluster = MockSearchCluster.buildGroupListForTest(3, 3, 100);

        assertEquals(distKeysAsString(SearchPath.selectNodes("1/1", cluster)), "4");
        assertEquals(distKeysAsString(SearchPath.selectNodes("/1", cluster)), "3,4,5");
        assertEquals(distKeysAsString(SearchPath.selectNodes("0,1/2", cluster)), "6,7");
        assertEquals(distKeysAsString(SearchPath.selectNodes("[1,3>/1", cluster)), "4,5");
        assertEquals(distKeysAsString(SearchPath.selectNodes("[1,88>/1", cluster)), "4,5");

        verifyRandomGroup(cluster, "[1,88>/", Set.of("1,2", "4,5", "7,8"));
        verifyRandomGroup(cluster, "[1,88>/0", Set.of("1,2"));
        verifyRandomGroup(cluster, "[1,88>/2", Set.of("7,8"));
        verifyRandomGroup(cluster, "[1,88>/0,2", Set.of("1,2", "7,8"));
    }