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

        // Session creation
        session.send(ComposableBody.builder().build());
        StubConnection conn = cm.awaitConnection();
        AbstractBody scr = getSessionCreationResponse(conn.getRequest().getBody()).build();
        conn.sendResponse(scr);
        session.drain();
        
        // Explicit session termination
        session.close();
      
        try {
            session.send(ComposableBody.builder().build());
        } catch(BOSHException e) {
            String msg = e.getMessage();
            assertTrue(msg.contains("Cannot send message when session is closed"));
            return;
        }

        fail("Expected BOSHException");
    }