### Question:
DisconnectController { @RequestMapping(method=RequestMethod.POST) public ResponseEntity<String> disconnect(@RequestParam("signed_request") String signedRequest) { try { String userId = getUserId(signedRequest); logger.info("Deauthorization request received for Facebook User ID: " + userId + "; Removing connections."); Set<String> providerUserIds = new HashSet<String>(); providerUserIds.add(userId); Set<String> localUserIds = usersConnectionRepository.findUserIdsConnectedTo("facebook", providerUserIds); for (String localUserId : localUserIds) { ConnectionRepository connectionRepository = usersConnectionRepository.createConnectionRepository(localUserId); logger.info(" Removing Facebook connection for local user '" + localUserId + "'"); connectionRepository.removeConnection(new ConnectionKey("facebook", userId)); } return new ResponseEntity<String>(HttpStatus.NO_CONTENT); } catch (SignedRequestException e) { return new ResponseEntity<String>(HttpStatus.BAD_REQUEST); } } DisconnectController(UsersConnectionRepository usersConnectionRepository, String applicationSecret); @RequestMapping(method=RequestMethod.POST) ResponseEntity<String> disconnect(@RequestParam("signed_request") String signedRequest);  }### Answer:
@Test public void disconnect() throws Exception { FacebookConnectionFactory connectionFactory = new FacebookConnectionFactory("clientId", CLIENT_SECRET); Connection<Facebook> connection = connectionFactory.createConnection(new ConnectionData("facebook", "738140579", "", "", "", "", "", "", null)); StubUsersConnectionRepository usersConnectionRepository = new StubUsersConnectionRepository(); ConnectionRepository connectionRepository = usersConnectionRepository.createConnectionRepository("habuma"); connectionRepository.addConnection(connection); assertEquals(1, connectionRepository.findAllConnections().size()); DisconnectController controller = new DisconnectController(usersConnectionRepository, CLIENT_SECRET); MockMvc mockMvc = standaloneSetup(controller).build(); mockMvc.perform(post("/disconnect/facebook").param("signed_request", SIGNED_REQUEST)) .andExpect(status().isNoContent()); assertEquals(0, connectionRepository.findAllConnections().size()); }