NettyChannelTracker implements ChannelPoolHandler { public int inUseChannelCount( BoltServerAddress address ) { return retrieveInReadLock( () -> addressToInUseChannelCount.getOrDefault( address, 0 ) ); } NettyChannelTracker( MetricsListener metricsListener, EventExecutor eventExecutor, Logging logging );  NettyChannelTracker( MetricsListener metricsListener, ChannelGroup channels, Logging logging ); @Override void channelReleased( Channel channel ); @Override void channelAcquired( Channel channel ); @Override void channelCreated( Channel channel ); void channelCreated( Channel channel, ListenerEvent creatingEvent ); ListenerEvent channelCreating( String poolId ); void channelFailedToCreate( String poolId ); void channelClosed( Channel channel ); int inUseChannelCount( BoltServerAddress address ); int idleChannelCount( BoltServerAddress address ); void prepareToCloseChannels();  }
@Test void shouldReturnZeroActiveCountForUnknownAddress() { assertEquals( 0, tracker.inUseChannelCount( address ) ); }