@Override
          protected int netReadBufferSize() {
            // netReadBufferSize() is invoked in SSLTransportLayer.read() prior to the read
            // operation. To avoid the read buffer being expanded too early, increase buffer size
            // only when read buffer is full. This ensures that BUFFER_UNDERFLOW is always
            // triggered in testNetReadBufferResize().
            boolean updateAllowed = netReadBuffer() != null && !netReadBuffer().hasRemaining();
            return getAndUpdateSize(super.netReadBufferSize(), netReadBufSizeOverride, updateAllowed);
          }
Replace the {@link #selector} instance with that overrides buffer sizing logic to induce BUFFER_OVERFLOW and
BUFFER_UNDERFLOW cases. This overrides the methods used to get the new size for the buffers used by
{@link javax.net.ssl.SSLEngine}, doubling the size of the buffer each time until the size recommended by the
engine is reached.
@param netReadBufSizeStart if non-null, initialize the net read buffer with this size.
@param netWriteBufSizeStart if non-null, initialize the net write buffer with this size.
@param appReadBufSizeStart if non-null, initialize the app buffer with this size.
ambry-network/src/test/java/com/github/ambry/network/SSLSelectorTest.java