docs: public ListenableFuture<List<Peer>> waitForPeersWithServiceMask(final int numPeers, final int mask) {
          lock.lock();
          try {
              List<Peer> foundPeers = findPeersWithServiceMask(mask);
              if (foundPeers.size() >= numPeers)
                  return Futures.immediateFuture(foundPeers);
              final SettableFuture<List<Peer>> future = SettableFuture.create();
              addConnectedEventListener(new PeerConnectedEventListener() {
                  @Override
                  public void onPeerConnected(Peer peer, int peerCount) {
                      final List<Peer> peers = findPeersWithServiceMask(mask);
                      if (peers.size() >= numPeers) {
                          future.set(peers);
                          removeConnectedEventListener(this);
                      }
                  }
              });
              return future;
          } finally {
              lock.unlock();
          }
      }