public class PostWithTotalCountITCase extends RestFbIntegrationTestBase {
@Test
public void checkPostWithCommentsAndLikes() {
DefaultFacebookClient client = new DefaultFacebookClient(getAccessToken(), Version.VERSION_2_1);
Post gotPost =
client.fetchObject("74133697733_10152424266332734", Post.class,
Parameter.with("fields", "from,to,likes.summary(true),comments.summary(true)"));
assertNotNull(gotPost);
assertTrue(gotPost.getLikesCount() > 0);
assertTrue(gotPost.getLikes().getCount() > 0);
assertEquals(gotPost.getLikesCount(), gotPost.getLikes().getCount());
assertTrue(gotPost.getComments().getTotalCount() > 0);
}