DirectConnectionProvider implements ConnectionProvider { public BoltServerAddress getAddress() { return address; } DirectConnectionProvider( BoltServerAddress address, ConnectionPool connectionPool ); @Override CompletionStage<Connection> acquireConnection( ConnectionContext context ); @Override CompletionStage<Void> verifyConnectivity(); @Override CompletionStage<Void> close(); @Override CompletionStage<Boolean> supportsMultiDb(); BoltServerAddress getAddress();  }
@Test void returnsCorrectAddress() { BoltServerAddress address = new BoltServerAddress( "server-1", 25000 ); DirectConnectionProvider provider = new DirectConnectionProvider( address, mock( ConnectionPool.class ) ); assertEquals( address, provider.getAddress() ); }