code: public static boolean hasManagedDependency(Model pom, String groupId, String artifactId) {
          if (pom != null) {
              DependencyManagement dependencyManagement = pom.getDependencyManagement();
              if (dependencyManagement != null) {
                  return hasDependency(dependencyManagement.getDependencies(), groupId, artifactId);
              }
          }
          return false;
      }
docs: Returns true if the pom has the given managed dependency