void (@NotNull Configurable configurable, @NotNull Node node) { if (configurable instanceof SearchableConfigurable searchableConfigurable) { assertEquals(node.getId(), searchableConfigurable.getId()); List<Configurable> children = Collections.emptyList(); if (configurable instanceof Configurable.Composite composite) { children = Arrays.asList(composite.getConfigurables()); } assertEquals(node.getChildren().size(), children.size()); for (int i = 0; i < children.size(); i++) { matchNodesDeeply(children.get(i), node.getChildren().get(i)); } } else { fail("Cannot cast to " + SearchableConfigurable.class.getName() + ", " + configurable); } }