private static void pushTest(final String[] args) throws CommunicationException, KeystoreException {
    final String keystore = args[0];
    final String password = args[1];
    final String token = args[2];
    final boolean production = args.length >= 4 && args[3].equalsIgnoreCase("production");
    final boolean simulation = args.length >= 4 && args[3].equalsIgnoreCase("simulation");
    final boolean complex = args.length >= 5 && args[4].equalsIgnoreCase("complex");
    final boolean threads = args.length >= 5 && args[4].equalsIgnoreCase("threads");
    final int threadDevices = args.length >= 6 ? Integer.parseInt(args[5]) : 100;
    final int threadThreads = args.length >= 7 ? Integer.parseInt(args[6]) : 10;
    final boolean simple = !complex && !threads;

    verifyKeystore(keystore, password, production);

    if (simple) {
      /* Push a test alert */
      final List<PushedNotification> notifications = Push.test(keystore, password, production, token);
      printPushedNotifications(notifications);
    } else if (complex) {
      /* Push a more complex payload */
      final List<PushedNotification> notifications = Push.payload(createComplexPayload(), keystore, password, production, token);
      printPushedNotifications(notifications);
    } else {
      /* Push a Hello World! alert repetitively using NotificationThreads */
      pushSimplePayloadUsingThreads(keystore, password, production, token, simulation, threadDevices, threadThreads);

    }
  }