SpecialGroupClaimProvider implements JWTClaimProvider { public void parseClaim(Context context, HttpServletRequest request, JWTClaimsSet jwtClaimsSet) { try { List<String> groupIds = jwtClaimsSet.getStringListClaim(SPECIAL_GROUPS); for (String groupId : CollectionUtils.emptyIfNull(groupIds)) { context.setSpecialGroup(UUID.fromString(groupId)); } } catch (ParseException e) { log.error("Error while trying to access specialgroups from ClaimSet", e); } }  String getKey(); Object getValue(Context context, HttpServletRequest request); void parseClaim(Context context, HttpServletRequest request, JWTClaimsSet jwtClaimsSet); static final String SPECIAL_GROUPS; }
@Test public void parseClaim() throws Exception { specialGroupClaimProvider.parseClaim(context, httpServletRequest, jwtClaimsSet); assertThat(specialGroups, containsInAnyOrder( UUID.fromString(id1), UUID.fromString(id2), UUID.fromString(id3))); }