@Test
public void testValidClientIndex() throws Exception {

  ConnectionPool pool = new ConnectionPool(
      conf, TEST_NN_ADDRESS, TEST_USER1, 2, 2, 0.5f, ClientProtocol.class);
  for(int i = -3; i <= 3; i++) {
    pool.getClientIndex().set(i);
    ConnectionContext conn = pool.getConnection();
    assertNotNull(conn);
    assertTrue(conn.isUsable());
  }
}