public void subscribeToFeed(User user, FeedSubscription subscription) throws SubscriptionAlreadyExistentException, UserNotExistentException {
if (this.userRepository.getUserByUsername(user.getUsername()) != null) {
user.subscribe(subscription);
this.userRepository.addUser(user);
} else {
throw new UserNotExistentException("User not found: " + user);
}
}