### Question:
ApnsChannelPool { Future<Channel> acquire() { final Promise<Channel> acquirePromise = new DefaultPromise<>(this.executor); if (this.executor.inEventLoop()) { this.acquireWithinEventExecutor(acquirePromise); } else { this.executor.submit(() -> ApnsChannelPool.this.acquireWithinEventExecutor(acquirePromise)).addListener(future -> { if (!future.isSuccess()) { acquirePromise.tryFailure(future.cause()); } }); } return acquirePromise; } ApnsChannelPool(final PooledObjectFactory<Channel> channelFactory, final int capacity, final OrderedEventExecutor executor, final ApnsChannelPoolMetricsListener metricsListener); Future<Void> close();  }### Answer:
@SuppressWarnings("AnonymousInnerClassMayBeStatic") @Test void testAcquireConstructionFailure() throws Exception { final PooledObjectFactory<Channel> factory = new PooledObjectFactory<Channel>() { @Override public Future<Channel> create(final Promise<Channel> promise) { promise.tryFailure(new RuntimeException()); return promise; } @Override public Future<Void> destroy(final Channel channel, final Promise<Void> promise) { promise.trySuccess(null); return promise; } }; final ApnsChannelPool pool = new ApnsChannelPool(factory, 1, EVENT_EXECUTOR, this.metricsListener); assertFalse(pool.acquire().await().isSuccess()); assertEquals(0, this.metricsListener.getConnectionsAdded()); assertEquals(0, this.metricsListener.getConnectionsRemoved()); assertEquals(1, this.metricsListener.getConnectionsFailed()); }