@Override
 public Set<String> findUserIdsConnectedTo(
     final String providerId, final Set<String> providerUserIds) {
   final List<UserConnection> userConnections =
       userConnectionRepository.findByProviderIdAndProviderUserIdIn(providerId, providerUserIds);
   return userConnections.stream().map(UserConnection::getUserId).collect(toSet());
 }
 @Override
 public List<String> findUserIdsWithConnection(final Connection<?> connection) {
   final ConnectionKey key = connection.getKey();
   final List<UserConnection> userConnections =
       userConnectionRepository.findByProviderIdAndProviderUserId(
           key.getProviderId(), key.getProviderUserId());
   return userConnections.stream().map(UserConnection::getUserId).collect(toList());
 }