### Eclipse Workspace Patch 1.0 #P vysper Index: src/test/java/org/apache/vysper/xmpp/protocol/ProtocolWorkerProcessTestCase.java =================================================================== --- src/test/java/org/apache/vysper/xmpp/protocol/ProtocolWorkerProcessTestCase.java (revision 764582) +++ src/test/java/org/apache/vysper/xmpp/protocol/ProtocolWorkerProcessTestCase.java (working copy) @@ -257,7 +257,6 @@ protocolWorker.processStanza(sessionContext.getServerRuntimeContext(), sessionContext, stanzaBuilder.getFinalStanza(), sessionStateHolder); Stanza recordedResponse = sessionContext.getNextRecordedResponse(); assertUnknownSenderError(recordedResponse); // not allowed, bare id without resource and two resources bound - sessionContext.write(null); // reset // unbind second resource, leaving only one boolean noResourceRemains = sessionContext.getServerRuntimeContext().getResourceRegistry().unbindResource(secondBoundResource); @@ -269,7 +268,6 @@ stanzaBuilder.startInnerElement("query").addNamespaceAttribute("testNSURI").endInnerElement(); protocolWorker.processStanza(sessionContext.getServerRuntimeContext(), sessionContext, stanzaBuilder.getFinalStanza(), sessionStateHolder); stanzaHandler.assertHandlerCalled(); - sessionContext.write(null); // reset // second resource is now invalid and cannot be used anymore in a full qualified entity stanzaBuilder = StanzaBuilder.createIQStanza(null, null, IQStanzaType.GET, "test"); Index: src/test/java/org/apache/vysper/xmpp/server/TestSessionContext.java =================================================================== --- src/test/java/org/apache/vysper/xmpp/server/TestSessionContext.java (revision 764582) +++ src/test/java/org/apache/vysper/xmpp/server/TestSessionContext.java (working copy) @@ -83,10 +83,8 @@ /** * @param stanza records the stanza. if NULL, the prev recorded stanza will be reset. - * @throws IllegalStateException if NOT NULL, and there is already a stanza recorded */ public void write(Stanza stanza) { - if (recordedResponses.size() > 0 && stanza != null) throw new IllegalStateException("stanza already recorded"); recordedResponses.add(stanza); }