code: private String getFirstSurrogateFor(SurrogateCapabilitiesHeader surrogateCapabilitiesHeader, String capability) {
          for (SurrogateCapabilities surrogate : surrogateCapabilitiesHeader.getSurrogates()) {
  
              for (Capability sc : surrogate.getCapabilities()) {
                  if (capability.equals(sc.toString())) {
                      return surrogate.getDeviceToken();
                  }
              }
          }
          return null;
      }
docs: Returns the first surrogate which supports the requested capability.
  
  @param surrogateCapabilitiesHeader
  @param capability
  @return a Surrogate or null if the capability is not found.