server.getWaitForError().acquire();
server.start();
ApnsService service =
APNS.newService().withSSLContext(clientContext())
.withGatewayDestination(LOCALHOST, server.getEffectiveGatewayPort())
.withDelegate(new ApnsDelegate() {
public void messageSent(ApnsNotification message, boolean resent) {
}
public void messageSendFailed(ApnsNotification message, Throwable e) {
numError.incrementAndGet();