use of com.redhat.cloud.notifications.models.EmailSubscriptionId in project notifications-backend by RedHatInsights.
the class LifecycleITest method subscribeUserPreferences.
@Transactional
void subscribeUserPreferences(String accountId, String userId, UUID appId) {
Application application = entityManager.find(Application.class, appId);
EmailSubscription subscription = new EmailSubscription();
subscription.setId(new EmailSubscriptionId());
subscription.setAccountId(accountId);
subscription.setUserId(userId);
subscription.setApplication(application);
subscription.setType(INSTANT);
entityManager.persist(subscription);
}
Aggregations