@Test
public void getGroupMemberships() {

	mockServer.expect(requestTo(GroupTemplate.GROUP_MEMBERSHIPS_URL + "?oauth2_access_token=ACCESS_TOKEN")).andExpect(method(GET))
		.andRespond(withSuccess(new ClassPathResource("group_memberships.json", getClass()), MediaType.APPLICATION_JSON));
	GroupMemberships memberships = linkedIn.groupOperations().getGroupMemberships();
	
	assertEquals(10, memberships.getCount());
	assertEquals(0, memberships.getStart());
	assertEquals(30, memberships.getTotal());
	assertEquals(10, memberships.getMemberships().size());
	
	GroupSettings s = memberships.getMemberships().get(0);
	assertEquals(true, s.getAllowMessagesFromMembers());
	assertEquals(false, s.getEmailAnnouncementsFromManagers());
	assertEquals(EmailDigestFrequency.NONE, s.getEmailDigestFrequency());
	assertEquals(MembershipState.MEMBER, s.getMembershipState());
	assertEquals(true, s.getShowGroupLogoInProfile());
	assertEquals(new Integer(69286), s.getGroup().getId());
	assertEquals("Software Architect Network", s.getGroup().getName());
}