public void testDetectWrongFromResourceId() throws XMLSemanticError, BindException {
Entity server = sessionContext.getServerRuntimeContext().getServerEnitity();
sessionContext.setSessionState(SessionState.AUTHENTICATED);
// the session is running for 'charlotte'
sessionContext.setInitiatingEntity(new EntityImpl("charlotte", server.getDomain(), null));
CallTestStanzaHandler stanzaHandler = new CallTestStanzaHandler("iq", "testNSURI");
namespaceHandlerDictionary.register(stanzaHandler);
String onlyBoundResource = sessionContext.bindResource();
String arbitraryUnboundResource = "unboundResourceID";
StanzaBuilder stanzaBuilder = StanzaBuilder.createIQStanza(null, null, IQStanzaType.GET, "test");
stanzaBuilder.addAttribute("from", new EntityImpl("charlotte", server.getDomain(), arbitraryUnboundResource).getFullQualifiedName());
stanzaBuilder.startInnerElement("query", "testNSURI").endInnerElement();
protocolWorker.processStanza(sessionContext.getServerRuntimeContext(), sessionContext, stanzaBuilder.build(), sessionStateHolder);
try {