### Question:
ApnsClient { public CompletableFuture<Void> close() { log.info("Shutting down."); final CompletableFuture<Void> closeFuture; if (this.isClosed.compareAndSet(false, true)) { closeFuture = new CompletableFuture<>(); this.channelPool.close().addListener((GenericFutureListener<Future<Void>>) closePoolFuture -> { if (ApnsClient.this.shouldShutDownEventLoopGroup) { ApnsClient.this.eventLoopGroup.shutdownGracefully().addListener(future -> closeFuture.complete(null)); } else { closeFuture.complete(null); } }); } else { closeFuture = CompletableFuture.completedFuture(null); } return closeFuture; } protected  ApnsClient(final InetSocketAddress apnsServerAddress, final SslContext sslContext,
                         final ApnsSigningKey signingKey, final Duration tokenExpiration,
                         final ProxyHandlerFactory proxyHandlerFactory,  final Duration connectTimeout,
                         final Duration idlePingInterval, final Duration gracefulShutdownTimeout,
                         final int concurrentConnections,  final ApnsClientMetricsListener metricsListener,
                         final Http2FrameLogger frameLogger, final EventLoopGroup eventLoopGroup); PushNotificationFuture<T, PushNotificationResponse<T>> sendNotification(final T notification); CompletableFuture<Void> close();  }### Answer:
@Test void testApnsClientWithManagedEventLoopGroup() throws Exception { final ApnsClient managedGroupClient = new ApnsClientBuilder() .setApnsServer(HOST, PORT) .setSigningKey(this.signingKey) .build(); assertDoesNotThrow(() -> managedGroupClient.close().get()); }