mockMvc.perform(get("/connect/oauth2Provider").sessionAttr("social_addConnection_duplicate", new DuplicateConnectionException(null)))
.andExpect(view().name("connect/oauth2ProviderConnect"))
.andExpect(request().sessionAttribute("social_addConnection_duplicate", nullValue()))
.andExpect(request().attribute("social_addConnection_duplicate", true));
mockMvc.perform(get("/connect/oauth2Provider").sessionAttr("social_provider_error", new HttpClientErrorException(HttpStatus.INTERNAL_SERVER_ERROR)))
.andExpect(view().name("connect/oauth2ProviderConnect"))
.andExpect(request().sessionAttribute("social_provider_error", nullValue()))
.andExpect(request().attribute("social_provider_error", true));
}