private MetadataNotification newMetadataNotification() {
return newMetadataNotification(_inc, _notifierRepo);
}
public static MetadataNotification newMetadataNotification(AtomicInteger inc, MetadataNotifierRepository notifierRepo) {
MetadataNotifier notifier = MetadataNotifierRepositoryTest.newMetadataNotifier(inc);
notifier = notifierRepo.save(notifier);
int val = inc.incrementAndGet();
MetadataNotification metadataNotification = new MetadataNotification();
MetadataNotificationId mdNotId = new MetadataNotificationId();
mdNotId.setMetadataId(val);
mdNotId.setNotifierId(notifier.getId());
metadataNotification.setId(mdNotId);
metadataNotification.setAction(val % 2 == 0 ? MetadataNotificationAction.UPDATE : MetadataNotificationAction.DELETE);
metadataNotification.setErrorMessage("errorMessage" + val);