@Test
  public void testClose() {
    List<RequestInfo> requestInfoList = new ArrayList<RequestInfo>();
    networkClient.close();
    try {
      networkClient.sendAndPoll(requestInfoList, Collections.emptySet(), POLL_TIMEOUT_MS);
      Assert.fail("Polling after close should throw");
    } catch (IllegalStateException e) {
    }
  }
Test to ensure subsequent operations after a close throw an {@link IllegalStateException}.
ambry-network/src/test/java/com/github/ambry/network/SocketNetworkClientTest.java