NetworkConnection implements Connection { @Override public boolean isOpen() { return status.get() == Status.OPEN; } NetworkConnection( Channel channel, ExtendedChannelPool channelPool, Clock clock, MetricsListener metricsListener ); @Override boolean isOpen(); @Override void enableAutoRead(); @Override void disableAutoRead(); @Override void flush(); @Override void write( Message message, ResponseHandler handler ); @Override void write( Message message1, ResponseHandler handler1, Message message2, ResponseHandler handler2 ); @Override void writeAndFlush( Message message, ResponseHandler handler ); @Override void writeAndFlush( Message message1, ResponseHandler handler1, Message message2, ResponseHandler handler2 ); @Override CompletionStage<Void> reset(); @Override CompletionStage<Void> release(); @Override void terminateAndRelease( String reason ); @Override BoltServerAddress serverAddress(); @Override ServerVersion serverVersion(); @Override BoltProtocol protocol();  }
@Test void shouldBeOpenAfterCreated() { NetworkConnection connection = newConnection( newChannel() ); assertTrue( connection.isOpen() ); }