connectionFactoryLocator.addConnectionFactory(connectionFactory2);
StubConnectionRepository connectionRepository = new StubConnectionRepository();
connectionRepository.addConnection(connectionFactory1.createConnection(new ConnectionData("oauth1Provider", "provider1User1", null, null, null, null, null, null, null)));
MockMvc mockMvc = standaloneSetup(new ConnectController(connectionFactoryLocator, connectionRepository)).build();
mockMvc.perform(get("/connect"))
.andExpect(view().name("connect/status"))
.andExpect(model().attribute("providerIds", new HashSet<String>(asList("oauth1Provider", "oauth2Provider"))))
.andExpect(model().attributeExists("connectionMap"));
mockMvc.perform(get("/connect/oauth1Provider"))