private static void populateCapabilities(
     Set<CapabilityRegistration<?>> caps, ModelNode res, boolean possible) {
   for (CapabilityRegistration cr : caps) {
     ModelNode cap = res.add();
     cap.get(NAME.getName()).set(cr.getCapabilityName());
     cap.get(DYNAMIC.getName()).set(cr.getCapability().isDynamicallyNamed());
     if (!possible) {
       cap.get(SCOPE.getName()).set(cr.getCapabilityScope().getName());
     }
     populateRegistrationPoints(
         cap.get(REGISTRATION_POINTS.getName()), cr.getRegistrationPoints());
   }
 }
 private void populateCapabilityRegistration(CapabilityRegistration reg, ModelNode capability) {
   populateRegistrationPoints(
       capability.get(REGISTRATION_POINTS.getName()), reg.getRegistrationPoints());
 }