@Test
public void testLeaseInvalid() throws Exception {

    final StrictConnPool<String, HttpConnection> pool = new StrictConnPool<>(2, 10);
    try {
        pool.lease(null, null, Timeout.ZERO_MILLISECONDS, null);
        Assert.fail("NullPointerException should have been thrown");
    } catch (final NullPointerException expected) {
    }
    try {
        pool.lease("somehost", null, null, null);
        Assert.fail("IllegalArgumentException should have been thrown");
    } catch (final NullPointerException expected) {
    }
}