public void testUpdatedPresence() throws BindException, EntityFormatException {
StanzaReceiverRelay receiverRelay = (StanzaReceiverRelay) sessionContext.getServerRuntimeContext().getStanzaRelay();
// at first, initial presence
XMPPCoreStanza initialPresence = XMPPCoreStanza.getWrapper(StanzaBuilder.createPresenceStanza(initiatingUser.getEntityFQ(), null, null, null, null, null).build());
handler.executeCore(initialPresence, sessionContext.getServerRuntimeContext(), true, sessionContext);
assertTrue(0 < receiverRelay.getCountDelivered());
resetRecordedStanzas(); // purge recorded
assertTrue(0 == receiverRelay.getCountDelivered());
// send update now
final String showValue = "chatty";
XMPPCoreStanza updatePresence = XMPPCoreStanza.getWrapper(StanzaBuilder.createPresenceStanza(initiatingUser.getEntityFQ(), null, null, null, showValue, null).build());
handler.executeCore(updatePresence, sessionContext.getServerRuntimeContext(), true, sessionContext);
// check resource state
assertEquals(ResourceState.AVAILABLE, getResourceState());
// 3 presence update broadcasts to same session + 2 presence to subscribers