default Capability capability(final String protocol) {
    for (final Capability cap : getAgreedCapabilities()) {
      if (cap.getName().equalsIgnoreCase(protocol)) {
        return cap;
      }
    }
    return null;
  }
Returns the agreed capability corresponding to given protocol.

@param protocol the name of the protocol
@return the agreed capability corresponding to this protocol, returns null if no matching
    capability is supported
ethereum/p2p/src/main/java/org/hyperledger/besu/ethereum/p2p/rlpx/connections/PeerConnection.java