source: class MultiReactorTest {
  
      @Test
      public void canDealRequestWithSeveralReactor() throws IOException {
  
target:         int availablePort = NetUtils.getAvailablePort();
          MultiReactor reactor = MultiReactor.newBuilder()
                  .setPort(availablePort)
                  .setHandlerClass(InsureReactorHandler.class)
                  .setMainReactorName("MainReactor")
                  .setSubReactorCount(3)
                  .build();
          // start a new thread
          Thread reactorT = new Thread(reactor);
          reactorT.start();
          String first = NetWorkClient.doRequest("localhost", availablePort, "test\n");
          String second = NetWorkClient.doRequest("localhost", availablePort, "test\n");
          String third = NetWorkClient.doRequest("localhost", availablePort, "test\n");
          String nextRoundFirst = NetWorkClient.doRequest("localhost", availablePort, "test\n");
          List<String> responses = new ArrayList<>();
          responses.add(first);
          responses.add(second);
          responses.add(third);
          responses.add(nextRoundFirst);
          Map<String, Long> result = responses.stream().collect(Collectors.groupingBy(Function.identity(), Collectors.counting()));
          Map<String, Long> expect = new HashMap<>();
          expect.put("subReactor-0", 1L);
          expect.put("subReactor-1", 1L);
          expect.put("subReactor-2", 2L);
          assertEquals(expect, result);
      }
  
  }