### Question:
WxMpMessageRouter { public WxMpXmlOutMessage route(final WxMpXmlMessage wxMessage, final Map<String, Object> context) { return route(wxMessage, context, null); } WxMpMessageRouter(WxMpService wxMpService);  WxMpMessageRouter(WxMpService wxMpService, ExecutorService executorService); void shutDownExecutorService(); void setExecutorService(ExecutorService executorService); void setMessageDuplicateChecker(WxMessageDuplicateChecker messageDuplicateChecker); void setSessionManager(WxSessionManager sessionManager); void setExceptionHandler(WxErrorExceptionHandler exceptionHandler); WxMpMessageRouterRule rule(); WxMpXmlOutMessage route(final WxMpXmlMessage wxMessage, final Map<String, Object> context); WxMpXmlOutMessage route(final WxMpXmlMessage wxMessage, final Map<String, Object> context, WxMpService wxMpService); WxMpXmlOutMessage route(final WxMpXmlMessage wxMessage);  }### Answer:
@Test(dataProvider = "messages-1") public void testSync(WxMpXmlMessage message, String expected) { StringBuffer sb = new StringBuffer(); WxMpMessageRouter router = new WxMpMessageRouter(null); prepare(false, sb, router); router.route(message); Assert.assertEquals(sb.toString(), expected); }
@Test(dataProvider = "messages-1") public void testExternalExcutorService(WxMpXmlMessage message, String expected) throws InterruptedException { StringBuffer sb = new StringBuffer(); ExecutorService executorService = Executors.newFixedThreadPool(100); WxMpMessageRouter router = new WxMpMessageRouter(null, executorService); prepare(true, sb, router); router.route(message); Thread.sleep(500); executorService.shutdown(); Assert.assertEquals(sb.toString(), expected); }