.andExpect(request().sessionAttribute("oauthToken", samePropertyValuesAs(new OAuthToken("requestToken", "requestTokenSecret"))));
}
@Test
public void signIn_OAuth1Provider_exceptionWhileFetchingRequestToken() throws Exception {
ConnectionFactoryRegistry connectionFactoryLocator = new ConnectionFactoryRegistry();
ConnectionFactory<TestApi1> connectionFactory1 = new StubOAuth1ConnectionFactory("clientId", "clientSecret", StubOAuthTemplateBehavior.THROW_EXCEPTION);
connectionFactoryLocator.addConnectionFactory(connectionFactory1);
StubUsersConnectionRepository usersConnectionRepository = new StubUsersConnectionRepository();
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();