}
private Connection<?> getConnection(String providerId, String providerUserId) {
List<SocialAuthentication> socialAuthentications = userDao.getSocialAuthentications(providerId, providerUserId);
if (socialAuthentications.isEmpty()) {
throw new NoSuchConnectionException(new ConnectionKey(providerId, providerUserId));
}
return authToConnection(socialAuthentications.get(0));
}