@Test
public void testGetCommentsCount() {

	long classPK = RandomTestUtil.randomLong();
	long classNameId = RandomTestUtil.randomLong();
	int commentsCount = RandomTestUtil.randomInt();
	Mockito.when(
		_mbMessageLocalService.getDiscussionMessagesCount(
			classNameId, classPK, WorkflowConstants.STATUS_APPROVED)
	).thenReturn(
		commentsCount
	);
	Mockito.when(
		_portal.getClassNameId(_CLASS_NAME)
	).thenReturn(
		classNameId
	);
	Assert.assertEquals(
		commentsCount,
		_mbCommentManagerImpl.getCommentsCount(_CLASS_NAME, classPK));
}