@Test(timeout=5000)
    public void testItemNotFoundError() throws Exception {
        logTestStart();

        final AtomicBoolean connected = new AtomicBoolean();
        final AtomicReference<Throwable> caught =
                new AtomicReference<Throwable>();
        session.addBOSHClientConnListener(new BOSHClientConnListener() {
            public void connectionEvent(final BOSHClientConnEvent connEvent) {
                connected.set(connEvent.isConnected());
                caught.set(connEvent.getCause());
            }
        });

        assertFalse(connected.get());
        assertNull(caught.get());

        // Initiate a new session
        session.send(ComposableBody.builder().build());
        StubConnection conn = cm.awaitConnection();
        AbstractBody scr = ComposableBody.builder()
                .setAttribute(Attributes.SID, "123XYZ")
                .setAttribute(Attributes.WAIT, "1")
                .setAttribute(Attributes.VER, "1.8")
                .build();
        conn.sendResponse(scr);
        session.drain();

        assertTrue(connected.get());
        assertNull(caught.get());

        // Send a request and have it return a policy violation
        session.send(ComposableBody.builder()
                .setAttribute(Attributes.SID, scr.getAttribute(Attributes.SID))
                .build());
        conn = cm.awaitConnection();
        conn.sendResponse(ComposableBody.builder()
                .setAttribute(Attributes.TYPE, "terminate")
                .setAttribute(Attributes.CONDITION, "item-not-found")
                .build());
        session.drain();

        assertFalse(connected.get());
        assertNotNull(caught.get());
        BOSHException boshx = (BOSHException) caught.get();
        assertTrue(boshx.getMessage().contains(
                TerminalBindingCondition.ITEM_NOT_FOUND.getMessage()));

        // Attempts to send anything else should fail
        try {
            session.send(ComposableBody.builder().build());
            conn = cm.awaitConnection();
            conn.sendResponse(ComposableBody.builder()
                    .setAttribute(Attributes.SID, "123XYZ")
                    .build());
            fail("Shouldn't be able to send after terminal binding error");
        } catch (BOSHException ex) {
            // Good
        }
        assertValidators(scr);
    }