@Test
    void testUnlimitedRequestWithFaultyDelegate() throws Exception {
        final ClientRequestContext ctx = newContext();
        final HttpRequest req = newReq();

        when(delegate.execute(ctx, req)).thenThrow(Exception.class);

        final ConcurrencyLimitingClient client = newDecorator(1).apply(delegate);

        // A request should be delegated immediately, rethrowing the exception from the delegate.
        assertThatThrownBy(() -> client.execute(ctx, req).aggregate().join()).isInstanceOf(Exception.class);
        verify(delegate).execute(ctx, req);

        // The number of active requests should increase and then immediately decrease. i.e. stay back at 0.
        await().untilAsserted(() -> assertThat(client.numActiveRequests()).isZero());
    }
Tests the case where a delegate raises an exception rather than returning a response.
core/src/test/java/com/linecorp/armeria/client/limit/ConcurrencyLimitingClientTest.java