allowing(followersDAO).execute(STREAM_OWNER_ID);
will(returnValue(new ArrayList<Long>(Arrays.asList(ACTOR_ID, STREAM_OWNER_ID, 5L, 6L, 7L))));
}
});
NotificationBatch results = sut.translate(new ActivityNotificationsRequest(null, ACTOR_ID, STREAM_OWNER_ID,
ACTIVITY_ID));
// check recipients
assertEquals(2, results.getRecipients().size());
TranslatorTestHelper.assertRecipients(results, NotificationType.POST_TO_PERSONAL_STREAM, STREAM_OWNER_ID);
TranslatorTestHelper.assertRecipients(results, NotificationType.POST_TO_FOLLOWED_STREAM, 5L, 6L, 7L);
// check properties
PropertyMap<Object> props = results.getProperties();
assertEquals(5, props.size());
PropertyMapTestHelper.assertPlaceholder(props, "actor", PersonModelView.class, ACTOR_ID);
PropertyMapTestHelper.assertPlaceholder(props, "stream", PersonModelView.class, STREAM_OWNER_ID);
PropertyMapTestHelper.assertPlaceholder(props, "activity", ActivityDTO.class, ACTIVITY_ID);
PropertyMapTestHelper.assertAlias(props, "source", "stream");