usersConnectionRepository.createConnectionRepository("habuma").addConnection(connectionFactory1.createConnection(
new ConnectionData("oauth1Provider", "provider1User1", null, null, null, null, null, null, null)));
ProviderSignInController providerSignInController = new ProviderSignInController(connectionFactoryLocator, usersConnectionRepository, null);
providerSignInController.afterPropertiesSet();
MockMvc mockMvc = standaloneSetup(providerSignInController).build();
mockMvc.perform(post("/signin/oauth1Provider"))
.andExpect(redirectedUrl("https://someprovider.com/oauth/authorize?oauth_token=requestToken"))
.andExpect(request().sessionAttribute("oauthToken", samePropertyValuesAs(new OAuthToken("requestToken", "requestTokenSecret"))));
}
@Test