*/
@Test
public void shouldEventBeforeSendStanzaEvents() {
// we need to log in before
eventBus.fireEvent(new SessionRequestResultEvent(uri("user@domain")));
final BeforeStanzaSentTestHandler handler = new BeforeStanzaSentTestHandler();
session.addBeforeStanzaSentHandler(handler);
final Message packet = new Message();
session.send(packet);
assertTrue(handler.isCalledOnce());
assertSame(packet, handler.getLastEvent().getStanza());
}