HonoConnectionImpl implements HonoConnection { final long getReconnectMaxDelay(final int reconnectAttempt) { if (reconnectAttempt <= 0) { return 0L; } else if (reconnectAttempt <= 31) { final long currentMaxDelay = (1 << (reconnectAttempt - 1)) * clientConfigProperties.getReconnectDelayIncrement(); return currentMaxDelay >= 0 ? Math.min(clientConfigProperties.getReconnectMaxDelay(), currentMaxDelay) : clientConfigProperties.getReconnectMaxDelay(); } else { return clientConfigProperties.getReconnectMaxDelay(); } } HonoConnectionImpl(final Vertx vertx, final ClientConfigProperties clientConfigProperties);  HonoConnectionImpl(final Vertx vertx, final ConnectionFactory connectionFactory,
            final ClientConfigProperties clientConfigProperties); @Override final Vertx getVertx(); @Autowired(required = false) final void setTracer(final Tracer opentracingTracer); @Override final Tracer getTracer(); @Override final ClientConfigProperties getConfig(); @Override final void addDisconnectListener(final DisconnectListener<HonoConnection> listener); @Override final void addReconnectListener(final ReconnectListener<HonoConnection> listener); @Override final Future<T> executeOnContext(final Handler<Promise<T>> codeToRun); @Override final Future<Void> isConnected(); @Override final Future<Void> isConnected(final long waitForCurrentConnectAttemptTimeout); @Override final boolean isShutdown(); @Override final boolean supportsCapability(final Symbol capability); @Override final Future<HonoConnection> connect(); @Override final Future<HonoConnection> connect(final ProtonClientOptions options); @Override void closeAndFree(
            final ProtonLink<?> link,
            final Handler<Void> closeHandler); @Override void closeAndFree(
            final ProtonLink<?> link,
            final long detachTimeOut,
            final Handler<Void> closeHandler); @Override final Future<ProtonSender> createSender(
            final String targetAddress,
            final ProtonQoS qos,
            final Handler<String> closeHook); @Override Future<ProtonReceiver> createReceiver(
            final String sourceAddress,
            final ProtonQoS qos,
            final ProtonMessageHandler messageHandler,
            final Handler<String> remoteCloseHook); @Override Future<ProtonReceiver> createReceiver(
            final String sourceAddress,
            final ProtonQoS qos,
            final ProtonMessageHandler messageHandler,
            final int preFetchSize,
            final Handler<String> remoteCloseHook); @Override Future<ProtonReceiver> createReceiver(
            final String sourceAddress,
            final ProtonQoS qos,
            final ProtonMessageHandler messageHandler,
            final int preFetchSize,
            final boolean autoAccept,
            final Handler<String> remoteCloseHook); @Override final void shutdown(); @Override final void shutdown(final Handler<AsyncResult<Void>> completionHandler); @Override final void disconnect(); @Override final void disconnect(final Handler<AsyncResult<Void>> completionHandler); @Override String getRemoteContainerId(); @Override String getContainerId();  }
@Test public void testGetReconnectMaxDelay() { final long reconnectMaxDelay = 20000; props.setReconnectMaxDelay(reconnectMaxDelay); props.setReconnectDelayIncrement(100); honoConnection = new HonoConnectionImpl(vertx, connectionFactory, props); assertThat(honoConnection.getReconnectMaxDelay(0)).isEqualTo(0); assertThat(honoConnection.getReconnectMaxDelay(1)).isEqualTo(100); assertThat(honoConnection.getReconnectMaxDelay(3)).isEqualTo(400); assertThat(honoConnection.getReconnectMaxDelay(31)).isEqualTo(reconnectMaxDelay); assertThat(honoConnection.getReconnectMaxDelay(Integer.MAX_VALUE)).isEqualTo(reconnectMaxDelay); props.setReconnectDelayIncrement(Long.MAX_VALUE); honoConnection = new HonoConnectionImpl(vertx, connectionFactory, props); assertThat(honoConnection.getReconnectMaxDelay(31)).isEqualTo(reconnectMaxDelay); assertThat(honoConnection.getReconnectMaxDelay(Integer.MAX_VALUE)).isEqualTo(reconnectMaxDelay); }