@Test(timeout=3000)
    public void maxRequestsOutstanding() throws Exception {
        logTestStart();

        // Initiate a new session, accepting 2 concurrent connections
        session.send(ComposableBody.builder().build());
        StubConnection conn = cm.awaitConnection();
        final AbstractBody scr = getSessionCreationResponse(conn.getRequest().getBody())
                .setAttribute(Attributes.WAIT, "1")
                .setAttribute(Attributes.REQUESTS, "2")
                .setAttribute(Attributes.INACTIVITY, "5")
                .build();
        conn.sendResponse(scr);
        CMSessionParams params;
        while ((params = session.getCMSessionParams()) == null) {
            Thread.yield();
        }

        // Establish the max number of connections
        final ComposableBody resp = ComposableBody.builder()
            .setAttribute(Attributes.SID, scr.getAttribute(Attributes.SID))
            .build();

        List<StubConnection> outstanding = new ArrayList<StubConnection>();
        for (int i=0; i<params.getRequests().intValue(); i++) {
            session.send(ComposableBody.builder().build());
            outstanding.add(cm.awaitConnection());
        }
        
        final AtomicBoolean completed = new AtomicBoolean();
        Thread thr = new Thread(new Runnable() {
            public void run() {
                try {
                session.send(ComposableBody.builder().build());
                    StubConnection conn3 = cm.awaitConnection();
                    conn3.sendResponse(resp);
                } catch (Throwable thr) {
                    // Ignore.  It will register as a failure anyhow.
                } finally {
                    completed.set(true);
                }
            }
        });

        boolean pass = false;
        try {
            thr.start();
            try {
                // If we havent completed after 1.5 seconds, that's good
                Thread.sleep(1500);
                pass = thr.isAlive();
            } catch (InterruptedException intx) {
                // Not expected
            }
        } finally {
            thr.interrupt();
        }

        // Cleanup
        for (StubConnection connection : outstanding) {
            connection.sendResponse(resp);
        }

        assertTrue("Did not block until concurrent dropped below max", pass);
        assertValidators(scr);
    }