### Question:
SAMLUserDetailsServiceImpl implements SAMLUserDetailsService { List<String> readAuthorities(SAMLCredential credential) { return ListUtils.emptyIfNull(authorities) .stream() .filter(StringUtils::isNotBlank) .map(authName -> getGroupsFromArrayValue(credential, authName)) .flatMap(List::stream) .collect(Collectors.toList()); }  @Override UserContext loadUserBySAML(SAMLCredential credential);  }### Answer:
@Test public void testReadAuthorities() { List<String> actualAuthorities = userDetailsService.readAuthorities(credential); Assert.assertTrue(CollectionUtils.isEqualCollection(groups, actualAuthorities)); }