diff --git a/pom.xml b/pom.xml
index d3234cd..329d877 100644
--- a/pom.xml
+++ b/pom.xml
@@ -17,57 +17,57 @@
commons-codec
commons-codec
- 1.16.0
+ 1.17.1
org.projectlombok
lombok
- 1.18.30
+ 1.18.34
true
commons-io
commons-io
- 2.15.0
+ 2.16.1
org.springframework
spring-core
- 5.3.32
+ 5.3.37
provided
org.springframework
spring-web
- 5.3.32
+ 5.3.37
provided
org.springframework.boot
spring-boot-starter-data-mongodb
- 2.7.17
+ 2.7.18
provided
org.springframework.boot
spring-boot-starter-logging
- 2.7.17
+ 2.7.18
provided
org.apache.commons
commons-lang3
- 3.13.0
+ 3.14.0
com.google.zxing
core
- 3.5.2
+ 3.5.3
com.google.zxing
javase
- 3.5.2
+ 3.5.3
com.eatthepath
@@ -77,31 +77,31 @@
com.google.firebase
firebase-admin
- 8.2.0
+ 9.2.0
org.junit.jupiter
junit-jupiter
- 5.10.1
+ 5.10.2
test
org.mockito
mockito-junit-jupiter
- 4.8.1
+ 5.11.0
test
org.springframework.boot
spring-boot-starter-test
- 2.7.17
+ 2.7.18
test
org.wiremock
- wiremock
- 3.3.1
+ wiremock-standalone
+ 3.9.1
test
@@ -116,7 +116,7 @@
org.apache.maven.plugins
maven-compiler-plugin
- 3.9.0
+ 3.13.0
11
@@ -124,19 +124,19 @@
org.apache.maven.plugins
maven-surefire-plugin
- 3.0.0-M5
+ 3.2.5
org.junit.jupiter
junit-jupiter
- 5.8.2
+ 5.10.3
org.jacoco
jacoco-maven-plugin
- 0.8.7
+ 0.8.12
@@ -155,7 +155,7 @@
org.apache.maven.plugins
maven-enforcer-plugin
- 3.0.0
+ 3.5.0
enforce-versions
@@ -178,7 +178,7 @@
org.apache.maven.plugins
maven-source-plugin
- 3.2.1
+ 3.3.1
attach-sources
@@ -193,7 +193,7 @@
org.apache.maven.wagon
wagon-webdav-jackrabbit
- 3.5.1
+ 3.5.3
diff --git a/src/test/java/tiqr/org/push/APNSTest.java b/src/test/java/tiqr/org/push/APNSTest.java
index 619922a..fa087e8 100644
--- a/src/test/java/tiqr/org/push/APNSTest.java
+++ b/src/test/java/tiqr/org/push/APNSTest.java
@@ -1,6 +1,9 @@
package tiqr.org.push;
-import com.eatthepath.pushy.apns.server.*;
+import com.eatthepath.pushy.apns.server.AcceptAllPushNotificationHandlerFactory;
+import com.eatthepath.pushy.apns.server.MockApnsServer;
+import com.eatthepath.pushy.apns.server.MockApnsServerBuilder;
+import com.eatthepath.pushy.apns.server.PushNotificationHandlerFactory;
import io.netty.channel.nio.NioEventLoopGroup;
import org.junit.jupiter.api.Test;
import org.springframework.core.io.ClassPathResource;
@@ -17,11 +20,11 @@ class APNSTest {
@Test
void push() throws IOException, NoSuchAlgorithmException, InvalidKeyException, InterruptedException, ExecutionException, PushNotificationException {
- MockApnsServer server = buildServer(new AcceptAllPushNotificationHandlerFactory(), null);
- server.start(8099).get();
+ MockApnsServer server = buildServer(new AcceptAllPushNotificationHandlerFactory());
+ Integer port = server.start(8099).get();
APNS apns = new APNS(new APNSConfiguration(
"localhost",
- 8099,
+ port,
"classpath:/token-auth-private-key.p8",
"classpath:/ca.pem",
"topic",
@@ -35,7 +38,7 @@ void push() throws IOException, NoSuchAlgorithmException, InvalidKeyException, I
server.shutdown().get();
}
- protected MockApnsServer buildServer(final PushNotificationHandlerFactory handlerFactory, final MockApnsServerListener listener) throws IOException {
+ protected MockApnsServer buildServer(final PushNotificationHandlerFactory handlerFactory) throws IOException {
return new MockApnsServerBuilder()
.setServerCredentials(
new ClassPathResource("server-certs.pem").getInputStream(),
@@ -44,7 +47,6 @@ protected MockApnsServer buildServer(final PushNotificationHandlerFactory handle
.setTrustedClientCertificateChain(new ClassPathResource("ca.pem").getInputStream())
.setEventLoopGroup(new NioEventLoopGroup(2))
.setHandlerFactory(handlerFactory)
- .setListener(listener)
.build();
}