@Test
public void testMappings() {

    ctx.getLdapAttributes().put("cn", "mock");
    attributeMappings.put("FullName", "cn");
    UserDetails details = mapper.mapUserFromContext(ctx, SAMPLE_USERNAME, authorities);
    assertTrue(details instanceof UserDetailsWithAttributes);
    UserDetailsWithAttributes detailsWithAttribute = (UserDetailsWithAttributes) details;
    assertEquals("mock", detailsWithAttribute.getAttribute("FullName"));
}