### Question:
SAMLUserDetailsServiceImpl implements SAMLUserDetailsService { Map<String, String> readAttributes(SAMLCredential credential) { if (CollectionUtils.isEmpty(samlAttributes)) { return Collections.emptyMap(); } Map<String, String> parsedAttributes = new HashMap<>(); for (String attribute : samlAttributes) { if (attribute.contains(ATTRIBUTES_DELIMITER)) { String[] splittedRecord = attribute.split(ATTRIBUTES_DELIMITER); String key = splittedRecord[0]; String value = splittedRecord[1]; if (StringUtils.isEmpty(key) || StringUtils.isEmpty(value)) { LOGGER.error("Can not parse saml user attributes property."); continue; } String attributeValues = credential.getAttributeAsString(value); if (StringUtils.isNotEmpty(attributeValues)) { parsedAttributes.put(key, attributeValues); } } } return parsedAttributes; }  @Override UserContext loadUserBySAML(SAMLCredential credential);  }### Answer:
@Test public void testReadAttributes() { Map<String, String> readAttributes = userDetailsService.readAttributes(credential); Assert.assertTrue(CollectionUtils.isEqualCollection(expectedAttributes.entrySet(), readAttributes.entrySet())); }