activity.setBaseObjectType(BaseObjectType.BOOKMARK);
activity.setBaseObject(baseObject);
final List<Long> commentIds = Arrays.asList(1L, 2L);
CommentDTO comment1 = new CommentDTO();
comment1.setBody("something something");
CommentDTO comment2 = new CommentDTO();
comment2.setBody("another comment");
final List<CommentDTO> comments = Arrays.asList(comment1, comment2);
CONTEXT.checking(new Expectations()
{
{
oneOf(commentIdsByActivityIdDAO).execute(activity.getId());
will(returnValue(commentIds));
oneOf(commentsByIdDAO).execute(with(any(List.class)));
will(returnValue(comments));
}
});
assertEquals(description + " " + comment1.getBody() + " " + comment2.getBody() + constantKeywordComponent, sut
.objectToString(activity).trim());
}