@Test
  public void testNoRejectRequests() throws InterruptedException {
    Properties properties = new Properties();
    properties.setProperty(NetworkConfig.REQUEST_QUEUE_CAPACITY, "2");
    NettyServerRequestResponseChannel channel =
        spy(new NettyServerRequestResponseChannel(new NetworkConfig(new VerifiableProperties(properties)),
            new Http2ServerMetrics(new MetricRegistry()), new ServerMetrics(new MetricRegistry(), this.getClass()),
            null));
    channel.sendRequest(createNettyServerRequest(1));
    channel.sendRequest(createNettyServerRequest(1));
    // 1. Verify rejectRequest() is not invoked
    verify(channel, never()).rejectRequest(any(), anyBoolean());
  }
Test send and receive requests
@throws Exception
ambry-network/src/test/java/com/github/ambry/network/NettyServerRequestResponseChannelTest.java