public void testObjectToStringWithComment()
{
HashMap<String, String> baseObject = new HashMap<String, String>();
baseObject.put("description", description);
final Activity activity = new Activity();
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));
}