### Question:
RealTimeUpdateController { @RequestMapping(value="/{subscription}", method=GET, params="hub.mode=subscribe") public @ResponseBody String verifySubscription( @PathVariable("subscription") String subscription, @RequestParam("hub.challenge") String challenge, @RequestParam("hub.verify_token") String verifyToken) { logger.debug("Received subscription verification request for '" + subscription + "'."); return tokens.containsKey(subscription) && tokens.get(subscription).equals(verifyToken) ? challenge : ""; } @Inject  RealTimeUpdateController(Map<String, String> tokens, List<UpdateHandler> updateHandlers, String applicationSecret); @RequestMapping(value="/{subscription}", method=GET, params="hub.mode=subscribe") @ResponseBody String verifySubscription(
			@PathVariable("subscription") String subscription,
			@RequestParam("hub.challenge") String challenge,
			@RequestParam("hub.verify_token") String verifyToken); @RequestMapping(value="/{subscription}", method=POST) @ResponseBody String receiveUpdate(
			@PathVariable("subscription") String subscription,
			@RequestBody String payload,
			@RequestHeader(X_HUB_SIGNATURE) String signature);  }### Answer:
@Test public void verifySubscription() throws Exception { Map<String, String> tokens = new HashMap<String, String>(); tokens.put("foo", "yabbadabbadoo"); List<UpdateHandler> updateHandlers = new ArrayList<UpdateHandler>(); RealTimeUpdateController controller = new RealTimeUpdateController(tokens, updateHandlers, "signature"); MockMvc mockMvc = standaloneSetup(controller).build(); mockMvc.perform(get("/realtime/facebook/foo") .param("hub.mode", "subscribe") .param("hub.verify_token", "yabbadabbadoo") .param("hub.challenge", "123456789")).andExpect(content().string("123456789")); }