public ModuleVersionSelector getRequested() {
   ModuleComponentSelector moduleComponentSelector = dependency.getRequested();
   return DefaultModuleVersionSelector.newSelector(
       moduleComponentSelector.getGroup(),
       moduleComponentSelector.getName(),
       moduleComponentSelector.getVersion());
 }
 public UnresolvedDependencyEdge(UnresolvedDependencyResult dependency) {
   this.dependency = dependency;
   ModuleComponentSelector moduleComponentSelector = dependency.getAttempted();
   ModuleVersionSelector attempted =
       DefaultModuleVersionSelector.newSelector(
           moduleComponentSelector.getGroup(),
           moduleComponentSelector.getName(),
           moduleComponentSelector.getVersion());
   actual =
       DefaultModuleVersionIdentifier.newId(
           attempted.getGroup(), attempted.getName(), attempted.getVersion());
 }
 @Override
 public DependencyMetaData withTarget(ComponentSelector target) {
   if (target instanceof ModuleComponentSelector) {
     ModuleComponentSelector moduleTarget = (ModuleComponentSelector) target;
     ModuleVersionSelector requestedVersion =
         DefaultModuleVersionSelector.newSelector(
             moduleTarget.getGroup(), moduleTarget.getModule(), moduleTarget.getVersion());
     return copyWithTarget(moduleTarget, requestedVersion);
   } else if (target instanceof ProjectComponentSelector) {
     return copyWithTarget(target, requested);
   } else {
     throw new AssertionError("Invalid component selector type for substitution: " + target);
   }
 }