@Test
public void getPosts() {

	mockServer.expect(requestTo((GroupTemplate.GROUP_POSTS_URL + "&oauth2_access_token=ACCESS_TOKEN").replaceFirst("\\{group-id\\}", "46964"))).andExpect(method(GET))
		.andRespond(withSuccess(new ClassPathResource("group_posts.json", getClass()), MediaType.APPLICATION_JSON));
	GroupPosts posts = linkedIn.groupOperations().getPosts(46964);
	
	assertEquals(10, posts.getCount());
	assertEquals(0, posts.getStart());
	assertEquals(199, posts.getTotal());
	assertEquals(10, posts.getPosts().size());
	
	Post p = posts.getPosts().get(0);
	
	assertEquals(new Date(1326384086809l), p.getCreationTimestamp());
	assertProfile(p.getCreator(), null, "Programmer analyst trainee at Cognizant Technology Solutions", "Sathish", "K.", null, null);
	
	assertEquals(2, p.getLikes().size());
	assertProfile(p.getLikes().get(0), "i21Fzhxxxx", "Managing Director", "Tom", "Smith", null, null);
	
	assertEquals("g-35936-S-88778673", p.getId());
	
	assertEquals(false, p.getRelationToViewer().isFollowing());
	assertEquals(false, p.getRelationToViewer().isLiked());
	assertEquals(7, p.getRelationToViewer().getAvailableActions().size());
	assertEquals(PostAvailableAction.ADD_COMMENT, p.getRelationToViewer().getAvailableActions().get(0));
	assertEquals(PostAvailableAction.CATEGORIZE_AS_JOB, p.getRelationToViewer().getAvailableActions().get(1));
	
	assertEquals("", p.getSummary());
	assertEquals("how to integate spring batch admin console into existing spring batch process application /web application.", p.getTitle());
	
	p = posts.getPosts().get(1);
	
	assertEquals(new Date(1326376683000l), p.getCreationTimestamp());
	assertProfile(p.getCreator(), null, "Contributor at Interns Over 40", "Namita", "M.", null, null);
	
	assertEquals(0, p.getLikes().size());
	
	assertEquals("g-35936-S-88778673", p.getId());
	
	assertEquals(false, p.getRelationToViewer().isFollowing());
	assertEquals(false, p.getRelationToViewer().isLiked());
	assertEquals(7, p.getRelationToViewer().getAvailableActions().size());
	assertEquals(PostAvailableAction.ADD_COMMENT, p.getRelationToViewer().getAvailableActions().get(0));
	assertEquals(PostAvailableAction.CATEGORIZE_AS_JOB, p.getRelationToViewer().getAvailableActions().get(1));
	
	assertEquals("We keep doing it the same way. Looking for jobs where everyone else is looking . How stupid can I be. Thanks Peggy. Join our Insider updates: https://brt89802.infusionsoft.com/app/form/newsletter", p.getSummary());
	assertEquals("\"How To Find Jobs in ANY Economy\"  For Older Skilled Workers.", p.getTitle());
	
	assertEquals("internsover40beta.blogspot.com", p.getAttachment().getContentDomain());
	assertEquals("https://internsover40beta.blogspot.com/2011/11/find-those-hidden-jobs-webinar.html#", p.getAttachment().getContentUrl());
	assertEquals("https://2.bp.blogspot.com/-rqUKPf90Tv8/TsboRglXxJI/AAAAAAAADe0/EafW1pC6sns/s72-c/c419333_m.jpg", p.getAttachment().getImageUrl());
	assertEquals("We keep doing it the same way. Looking for jobs where everyone else is looking . How stupid can I be. Thanks Peggy. Join our Insider updates: https://brt89802.infusionsoft.com/app/form/newsletter", p.getAttachment().getSummary());
	assertEquals("\"How To Find Jobs in ANY Economy\"  For Older Skilled Workers.", p.getAttachment().getTitle());

}