@Test public void testTranslate() { final String groupName = "Group Name"; final Collection<Long> coordinators = Arrays.asList(1L, 3L); NotificationTranslator<GroupRemovedNotificationsRequest> sut = new PendingGroupDeniedTranslator(); GroupRemovedNotificationsRequest request = new GroupRemovedNotificationsRequest( RequestType.REQUEST_NEW_GROUP_DENIED, 0, groupName, coordinators); NotificationBatch results = sut.translate(request); assertEquals(1, results.getRecipients().size()); TranslatorTestHelper.assertRecipients(results, NotificationType.REQUEST_NEW_GROUP_DENIED, coordinators); PropertyMap<Object> props = results.getProperties(); assertEquals(2, props.size()); PropertyMapTestHelper.assertValue(props, "groupName", groupName); PropertyMapTestHelper.assertValue(props, NotificationPropertyKeys.HIGH_PRIORITY, true); }
@Override public NotificationBatch translate(final GroupRemovedNotificationsRequest inRequest) { NotificationBatch batch = new NotificationBatch(NotificationType.REQUEST_NEW_GROUP_DENIED, inRequest.getCoordinatorIds()); batch.setProperty("groupName", inRequest.getGroupName()); batch.setProperty(NotificationPropertyKeys.HIGH_PRIORITY, true); return batch; }
PendingGroupDeniedTranslator implements NotificationTranslator<GroupRemovedNotificationsRequest> { @Override public NotificationBatch translate(final GroupRemovedNotificationsRequest inRequest) { NotificationBatch batch = new NotificationBatch(NotificationType.REQUEST_NEW_GROUP_DENIED, inRequest.getCoordinatorIds()); batch.setProperty("groupName", inRequest.getGroupName()); batch.setProperty(NotificationPropertyKeys.HIGH_PRIORITY, true); return batch; } }
PendingGroupDeniedTranslator implements NotificationTranslator<GroupRemovedNotificationsRequest> { @Override public NotificationBatch translate(final GroupRemovedNotificationsRequest inRequest) { NotificationBatch batch = new NotificationBatch(NotificationType.REQUEST_NEW_GROUP_DENIED, inRequest.getCoordinatorIds()); batch.setProperty("groupName", inRequest.getGroupName()); batch.setProperty(NotificationPropertyKeys.HIGH_PRIORITY, true); return batch; }  }
PendingGroupDeniedTranslator implements NotificationTranslator<GroupRemovedNotificationsRequest> { @Override public NotificationBatch translate(final GroupRemovedNotificationsRequest inRequest) { NotificationBatch batch = new NotificationBatch(NotificationType.REQUEST_NEW_GROUP_DENIED, inRequest.getCoordinatorIds()); batch.setProperty("groupName", inRequest.getGroupName()); batch.setProperty(NotificationPropertyKeys.HIGH_PRIORITY, true); return batch; }  @Override NotificationBatch translate(final GroupRemovedNotificationsRequest inRequest); }
PendingGroupDeniedTranslator implements NotificationTranslator<GroupRemovedNotificationsRequest> { @Override public NotificationBatch translate(final GroupRemovedNotificationsRequest inRequest) { NotificationBatch batch = new NotificationBatch(NotificationType.REQUEST_NEW_GROUP_DENIED, inRequest.getCoordinatorIds()); batch.setProperty("groupName", inRequest.getGroupName()); batch.setProperty(NotificationPropertyKeys.HIGH_PRIORITY, true); return batch; }  @Override NotificationBatch translate(final GroupRemovedNotificationsRequest inRequest);  }