@Test
public void handleNotSupportedWithLdapException() throws Exception {

    mockMvc.perform(get("/notSupportedWithLdapException"))
            .andExpect(status().isBadRequest())
            .andExpect(content().contentType(APPLICATION_JSON_UTF8))
            .andExpect(jsonPath("$.message").value("Endpoint is not supported in the current configuration."))
            .andExpect(jsonPath("$.debugMessage").value("Endpoint is not supported when LDAP authentication is used."));
}