@Nullable
  public ArtifactDependencyNode collectDependencies(String groupId, String artifactId, String versionConstraint) throws Exception {
    Set<VersionConstraint> constraints = Collections.singleton(asVersionConstraint(versionConstraint));
    CollectRequest collectRequest = createCollectRequest(groupId, artifactId, constraints, EnumSet.of(ArtifactKind.ARTIFACT));
    ArtifactDependencyTreeBuilder builder = new ArtifactDependencyTreeBuilder();

    DependencyNode root = mySessionFactory.retryWithClearSessionData(
      mySessionFactory.createVerboseSession(),
      s -> ourSystem.collectDependencies(s, collectRequest)
    ).getResult().getRoot();

    if (root.getArtifact() == null && root.getChildren().size() == 1) {
      root = root.getChildren().get(0);
    }
    root.accept(new TreeDependencyVisitor(new FilteringDependencyVisitor(builder, createScopeFilter())));
    return builder.getRoot();
  }
@Nullable
  public ArtifactDependencyNode collectDependencies(String groupId, String artifactId, String versionConstraint)