public void run() {
      DefaultSmppClient client = new DefaultSmppClient();
      SmppSession session = null;
      try {

        if (testNumber == 1) {
          session =
              client.bind(
                  ConfigInit.getSmppSessionConfiguration(1, false), new DefaultSmppClientHandler());
          logger.info("stopping server 1");
          serverArray[1].stop();
          logger.info("stopping server 2");
          serverArray[2].stop();
          sleep(5000);

          session.submit(ConfigInit.getSubmitSm(), 12000);
          sleep(1000);
          session.unbind(5000);
          serverArray[1].start();
          serverArray[2].start();
        }
        if (testNumber == 2) {
          session =
              client.bind(
                  ConfigInit.getSmppSessionConfiguration(1, false), new DefaultSmppClientHandler());
          serverArray[2].stop();
          serverArray[2].start();
          sleep(2000);
          for (int j = 0; j < 6; j++) {
            session.submit(ConfigInit.getSubmitSm(), 12000);
          }
          sleep(1000);
          session.unbind(5000);
        }

      } catch (Exception e) {
        logger.error("", e);
      }
      if (session != null) {
        logger.info("Cleaning up session...");
        session.destroy();
      }
      logger.info("Shutting down client bootstrap and executors...");
      client.destroy();
      listener.clientCompleted();
    }
    public void run() {
      DefaultSmppClient client = new DefaultSmppClient();
      SmppSession session = null;
      try {
        clientHandlerArray[i] = new DefaultSmppClientHandler();
        session =
            client.bind(ConfigInit.getSmppSessionConfiguration(i, false), clientHandlerArray[i]);
        for (int j = 0; j < smsNumber; j++) {
          session.submit(ConfigInit.getSubmitSm(), 12000);
        }
        sleep(3000);
        session.unbind(5000);
      } catch (Exception e) {
        logger.error("", e);
      }
      if (session != null) {
        logger.info("Cleaning up session...");
        session.destroy();
      }

      logger.info("Shutting down client bootstrap and executors...");
      client.destroy();
      listener.clientCompleted();
    }