@Test
public void testGetAttributesMap() {

	List<Attribute> attributes = new ArrayList<>();
	attributes.add(
		OpenSamlUtil.buildAttribute("emailAddress", "test@liferay.com"));
	attributes.add(
		OpenSamlUtil.buildAttribute("firstName", "TestFirstName"));
	attributes.add(OpenSamlUtil.buildAttribute("lastName", "TestLastName"));
	attributes.add(OpenSamlUtil.buildAttribute("screenName", "test"));
	Map<String, List<Serializable>> attributesMap =
		SamlUtil.getAttributesMap(attributes, new Properties());
	Assert.assertEquals(
		"test@liferay.com",
		SamlUtil.getValueAsString("emailAddress", attributesMap));
	Assert.assertEquals(
		"TestFirstName",
		SamlUtil.getValueAsString("firstName", attributesMap));
	Assert.assertEquals(
		"TestLastName",
		SamlUtil.getValueAsString("lastName", attributesMap));
	Assert.assertEquals(
		"test", SamlUtil.getValueAsString("screenName", attributesMap));
}