@Test
public void shouldReturnUserRoles() throws LDAPException {

    final HttpServletRequest mockRequest = mock(HttpServletRequest.class);
    final LDAPInterface ldap = someLdapInterfaceReturning("foo");
    final LdapRoleCheckingRequest request = new LdapRoleCheckingRequest(mockRequest, ldap, "uid=test", someLdapProperties());
    assertThat(request.getRoles()).contains("foo");
}