System.err.format("%s rejected: %s\n", notification, rejectionReason);
}
}
public BenchmarkApp() throws Exception {
final ApnsPayloadBuilder builder = new ApnsPayloadBuilder();
final Random random = new Random();
for (int i = 0; i < NOTIFICATIONS_PER_TEST; i++) {
final byte[] token = new byte[32];
random.nextBytes(token);
builder.setAlertBody(new BigInteger(1024, new Random()).toString(16));
this.notifications.add(new SimpleApnsPushNotification(token, builder.buildWithDefaultMaximumLength()));
}
}