GroupServiceThreeLeggedOAuth10a extends AbstractGroupService implements OauthGroupService { @Override public List<Group20> getGroup20List(GroupProviderUserOauth oauth, GroupProvider provider) { final Group20Entry group20Entry = getGroup20Entry(oauth, provider, MAX_ITEMS, 0); return group20Entry == null ? new ArrayList<Group20>() : group20Entry.getEntry(); }  @Override Group20Entry getGroup20Entry(GroupProviderUserOauth oauth, GroupProvider groupProvider, int limit, int offset); @Override List<Group20> getGroup20List(GroupProviderUserOauth oauth, GroupProvider provider); @Override Group20 getGroup20(GroupProviderUserOauth oauth, GroupProvider groupProvider, String groupId); @Override List<Person> getGroupMembers(GroupProviderUserOauth oauth, GroupProvider provider, String groupId); @Override GroupMembersEntry getGroupMembersEntry(GroupProviderUserOauth oauth, GroupProvider provider, String groupId,
      int limit, int offset);  }
@Test public void testGetGroup20ListAvans() { super.setResponseResource(new ClassPathResource("avans-groups.json")); List<Group20> group20s = groupService.getGroup20List(oauth, provider); assertEquals(1, group20s.size()); assertEquals("nl.avans.AVANS-employee_grp", group20s.get(0).getId()); }
@Test public void testGetGroup20ListHz() { super.setResponseResource(new ClassPathResource("hz-groups.json")); List<Group20> group20s = groupService.getGroup20List(oauth, provider); assertEquals(3, group20s.size()); assertEquals("HZG-1042", group20s.get(0).getId()); }