Revision: 15517
Author: [email protected]
Date: Fri Nov 26 06:48:23 2010
Log: Fixes Issue 2116
http://code.google.com/p/mobicents/source/detail?r=15517
Added:
/trunk/servers/sip-servlets/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/session/SipSessionEventType.java
Modified:
/trunk/servers/sip-servlets/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/session/MobicentsSipSession.java
/trunk/servers/sip-servlets/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/session/SipManagerDelegate.java
/trunk/servers/sip-servlets/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/session/SipSessionImpl.java
/trunk/servers/sip-servlets/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/message/MobicentsSipSessionFacade.java
/trunk/servers/sip-servlets/sip-servlets-test-suite/applications/shootist-sip-servlet-auth/src/main/java/org/mobicents/servlet/sip/testsuite/ShootistSipServletAuth.java
/trunk/servers/sip-servlets/sip-servlets-test-suite/testsuite/src/test/java/org/mobicents/servlet/sip/testsuite/security/ShootistSipServletAuthTest.java
=======================================
--- /dev/null
+++
/trunk/servers/sip-servlets/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/session/SipSessionEventType.java
Fri Nov 26 06:48:23 2010
@@ -0,0 +1,25 @@
+/*
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.mobicents.servlet.sip.core.session;
+
+/**
+ * @author <A HREF="mailto:[email protected]">Jean Deruelle</A>
+ *
+ */
+public enum SipSessionEventType {
+ CREATION, DELETION, READYTOINVALIDATE;
+}
=======================================
---
/trunk/servers/sip-servlets/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/session/MobicentsSipSession.java
Thu Oct 28 09:49:13 2010
+++
/trunk/servers/sip-servlets/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/session/MobicentsSipSession.java
Fri Nov 26 06:48:23 2010
@@ -25,14 +25,11 @@
import javax.servlet.sip.Address;
import javax.servlet.sip.SipSession;
-import javax.servlet.sip.SipURI;
-import javax.servlet.sip.URI;
import javax.servlet.sip.ar.SipApplicationRouterInfo;
import javax.servlet.sip.ar.SipApplicationRoutingRegion;
import javax.sip.Dialog;
import javax.sip.SipException;
import javax.sip.Transaction;
-import javax.sip.message.Request;
import org.mobicents.javax.servlet.sip.SipSessionExt;
import org.mobicents.servlet.sip.message.B2buaHelperImpl;
@@ -168,4 +165,6 @@
void setRequestsPending(int requests);
void setAckReceived(long cSeq, boolean ackReceived);
-}
+
+ void notifySipSessionListeners(SipSessionEventType creation);
+}
=======================================
---
/trunk/servers/sip-servlets/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/session/SipManagerDelegate.java
Wed Nov 17 05:14:51 2010
+++
/trunk/servers/sip-servlets/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/session/SipManagerDelegate.java
Fri Nov 26 06:48:23 2010
@@ -274,6 +274,13 @@
protected MobicentsSipSession createSipSession(final SipSessionKey key,
final boolean create, final SipFactoryImpl sipFactoryImpl, final
MobicentsSipApplicationSession sipApplicationSessionImpl) {
MobicentsSipSession sipSessionImpl = null;
final MobicentsSipSession newSipSessionImpl =
getNewMobicentsSipSession(key, sipFactoryImpl, sipApplicationSessionImpl);
+ // notification moved out of the sip session constructor so that for
derived sessions it can be
+ // called after the attribute map has been set to avoid that the
application can create a different one
+ // in accessing the sip session attributes in the sip session creation
callback
+ if(sipApplicationSessionImpl.getSipContext() != null) {
+ // the sip context can be null if the AR returned an application that
was not deployed
+
newSipSessionImpl.notifySipSessionListeners(SipSessionEventType.CREATION);
+ }
sipSessionImpl = sipSessions.putIfAbsent(key,
newSipSessionImpl);
if(sipSessionImpl == null) {
if(logger.isDebugEnabled()) {
@@ -355,6 +362,14 @@
sipSessionImpl.setParentSession(parentSipSession);
parentSipSession.addDerivedSipSessions(sipSessionImpl);
+
+ // notification moved out of the sip session constructor so that for
derived sessions it can be
+ // called after the attribute map has been set to avoid that the
application can create a different one
+ // in accessing the sip session attributes in the sip session creation
callback
+ if(parentSipSession.getSipApplicationSession().getSipContext()
!= null) {
+ // the sip context can be null if the AR returned an application that
was not deployed
+
sipSessionImpl.notifySipSessionListeners(SipSessionEventType.CREATION);
+ }
return sipSessionImpl;
}
=======================================
---
/trunk/servers/sip-servlets/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/session/SipSessionImpl.java
Mon Nov 22 06:08:04 2010
+++
/trunk/servers/sip-servlets/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/core/session/SipSessionImpl.java
Fri Nov 26 06:48:23 2010
@@ -128,11 +128,7 @@
* @author <A HREF="mailto:[email protected]">Jean Deruelle</A>
*/
public class SipSessionImpl implements MobicentsSipSession {
-
- protected static enum SipSessionEventType {
- CREATION, DELETION, READYTOINVALIDATE;
- }
-
+
private static final Logger logger =
Logger.getLogger(SipSessionImpl.class);
protected transient SipApplicationSessionKey sipApplicationSessionKey;
@@ -277,17 +273,13 @@
this.ongoingTransactions = new
CopyOnWriteArraySet<Transaction>();
if(mobicentsSipApplicationSession.getSipContext() != null &&
ConcurrencyControlMode.SipSession.equals(mobicentsSipApplicationSession.getSipContext().getConcurrencyControlMode()))
{
semaphore = new Semaphore(1);
- }
- // the sip context can be null if the AR returned an application that
was not deployed
- if(mobicentsSipApplicationSession.getSipContext() != null) {
- notifySipSessionListeners(SipSessionEventType.CREATION);
- }
+ }
}
/**
* Notifies the listeners that a lifecycle event occured on that sip
session
* @param sipSessionEventType the type of event that happened
*/
- private void notifySipSessionListeners(SipSessionEventType
sipSessionEventType) {
+ public void notifySipSessionListeners(SipSessionEventType
sipSessionEventType) {
MobicentsSipApplicationSession sipApplicationSession =
getSipApplicationSession();
if(sipApplicationSession != null) {
SipContext sipContext =
sipApplicationSession.getSipContext();
@@ -1273,8 +1265,9 @@
*/
public void removeOngoingTransaction(Transaction transaction) {
+ boolean removed = false;
if(this.ongoingTransactions != null) {
- this.ongoingTransactions.remove(transaction);
+ removed = this.ongoingTransactions.remove(transaction);
}
// if(sessionCreatingTransactionRequest != null &&
sessionCreatingTransactionRequest.getMessage() != null &&
JainSipUtils.DIALOG_CREATING_METHODS.contains(sessionCreatingTransactionRequest.getMethod()))
{
@@ -1287,9 +1280,8 @@
sessionCreatingTransactionRequest.cleanUp();
}
-
if(logger.isDebugEnabled()) {
- logger.debug("transaction "+ transaction +" has been removed from sip
session's ongoingTransactions" );
+ logger.debug("transaction "+ transaction +" has been removed from sip
session's ongoingTransactions ? " + removed );
}
updateReadyToInvalidate(transaction);
@@ -1316,6 +1308,14 @@
// that are dialog terminating according to the appropriate RFC rules
relating to the kind of dialog.
if(!JainSipUtils.DIALOG_CREATING_METHODS.contains(method) &&
!JainSipUtils.DIALOG_TERMINATING_METHODS.contains(method)) {
+ if(getSessionCreatingDialog() == null && proxy == null)
{
+ // Fix for issue
http://code.google.com/p/mobicents/issues/detail?id=2116
+ // avoid creating derived sessions for non
dialogcreating requests
+ if(logger.isDebugEnabled()) {
+ logger.debug("resetting the to tag since a response to a non dialog
creating and terminating method has been received for non proxy session
with no dialog in state " + state);
+ }
+ key.setToTag(null);
+ }
return;
}
// Mapping to the sip session state machine (proxy is covered
here too)
@@ -1758,15 +1758,16 @@
return
getSipApplicationSession().getSipContext().getServletContext();
}
- /**
- * {...@inheritdoc}
+ /*
+ * (non-Javadoc)
+ * @see
org.mobicents.servlet.sip.core.session.MobicentsSipSession#removeDerivedSipSession(java.lang.String)
*/
public MobicentsSipSession removeDerivedSipSession(String toTag) {
return derivedSipSessions.remove(toTag);
}
-
- /**
- * {...@inheritdoc}
+ /*
+ * (non-Javadoc)
+ * @see
org.mobicents.servlet.sip.core.session.MobicentsSipSession#findDerivedSipSession(java.lang.String)
*/
public MobicentsSipSession findDerivedSipSession(String toTag) {
if(derivedSipSessions != null) {
@@ -1775,8 +1776,9 @@
return null;
}
- /**
- * {...@inheritdoc}
+ /*
+ * (non-Javadoc)
+ * @see
org.mobicents.servlet.sip.core.session.MobicentsSipSession#getDerivedSipSessions()
*/
public Iterator<MobicentsSipSession> getDerivedSipSessions() {
if(derivedSipSessions != null) {
@@ -1785,22 +1787,25 @@
return new HashMap<String,
MobicentsSipSession>().values().iterator();
}
- /**
- * {...@inheritdoc}
+ /*
+ * (non-Javadoc)
+ * @see
org.mobicents.servlet.sip.core.session.MobicentsSipSession#setParentSession(org.mobicents.servlet.sip.core.session.MobicentsSipSession)
*/
public void setParentSession(MobicentsSipSession mobicentsSipSession) {
parentSession = mobicentsSipSession;
}
- /**
- * {...@inheritdoc}
+ /*
+ * (non-Javadoc)
+ * @see
org.mobicents.servlet.sip.core.session.MobicentsSipSession#setSipSessionAttributeMap(java.util.Map)
*/
public void setSipSessionAttributeMap(
Map<String, Object> sipSessionAttributeMap) {
this.sipSessionAttributeMap = sipSessionAttributeMap;
}
- /**
- * {...@inheritdoc}
+ /*
+ * (non-Javadoc)
+ * @see
org.mobicents.servlet.sip.core.session.MobicentsSipSession#addDerivedSipSessions(org.mobicents.servlet.sip.core.session.MobicentsSipSession)
*/
public void addDerivedSipSessions(MobicentsSipSession derivedSession) {
if(derivedSipSessions == null) {
@@ -1808,20 +1813,23 @@
}
derivedSipSessions.putIfAbsent(derivedSession.getKey().getToTag(),
derivedSession);
}
- /**
- * {...@inheritdoc}
+ /*
+ * (non-Javadoc)
+ * @see
org.mobicents.servlet.sip.core.session.MobicentsSipSession#getSipSessionAttributeMap()
*/
public Map<String, Object> getSipSessionAttributeMap() {
return getAttributeMap();
}
- /**
- * @param localParty the localParty to set
+ /*
+ * (non-Javadoc)
+ * @see
org.mobicents.servlet.sip.core.session.MobicentsSipSession#setLocalParty(javax.servlet.sip.Address)
*/
public void setLocalParty(Address localParty) {
this.localParty = localParty;
}
- /**
- * @param remoteParty the remoteParty to set
+ /*
+ * (non-Javadoc)
+ * @see
org.mobicents.servlet.sip.core.session.MobicentsSipSession#setRemoteParty(javax.servlet.sip.Address)
*/
public void setRemoteParty(Address remoteParty) {
this.remoteParty = remoteParty;
=======================================
---
/trunk/servers/sip-servlets/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/message/MobicentsSipSessionFacade.java
Mon Nov 22 09:31:04 2010
+++
/trunk/servers/sip-servlets/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/message/MobicentsSipSessionFacade.java
Fri Nov 26 06:48:23 2010
@@ -29,6 +29,7 @@
import org.mobicents.servlet.sip.core.session.MobicentsSipSession;
import org.mobicents.servlet.sip.core.session.SipApplicationSessionKey;
import org.mobicents.servlet.sip.core.session.SipManager;
+import org.mobicents.servlet.sip.core.session.SipSessionEventType;
import org.mobicents.servlet.sip.core.session.SipSessionKey;
import org.mobicents.servlet.sip.proxy.ProxyImpl;
import org.mobicents.servlet.sip.startup.SipContext;
@@ -455,5 +456,9 @@
public void setRequestsPending(int requests) {
sipSession.setRequestsPending(requests);
}
+
+ public void notifySipSessionListeners(SipSessionEventType creation) {
+ sipSession.notifySipSessionListeners(creation);
+ }
}
=======================================
---
/trunk/servers/sip-servlets/sip-servlets-test-suite/applications/shootist-sip-servlet-auth/src/main/java/org/mobicents/servlet/sip/testsuite/ShootistSipServletAuth.java
Mon Oct 18 07:53:45 2010
+++
/trunk/servers/sip-servlets/sip-servlets-test-suite/applications/shootist-sip-servlet-auth/src/main/java/org/mobicents/servlet/sip/testsuite/ShootistSipServletAuth.java
Fri Nov 26 06:48:23 2010
@@ -21,6 +21,7 @@
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.sip.AuthInfo;
+import javax.servlet.sip.ServletParseException;
import javax.servlet.sip.SipApplicationSession;
import javax.servlet.sip.SipFactory;
import javax.servlet.sip.SipServlet;
@@ -28,16 +29,20 @@
import javax.servlet.sip.SipServletListener;
import javax.servlet.sip.SipServletRequest;
import javax.servlet.sip.SipServletResponse;
+import javax.servlet.sip.SipSession;
+import javax.servlet.sip.SipSessionEvent;
+import javax.servlet.sip.SipSessionListener;
import javax.servlet.sip.SipURI;
+import javax.sip.ListeningPoint;
import org.apache.log4j.Logger;
public class ShootistSipServletAuth
extends SipServlet
- implements SipServletListener {
+ implements SipServletListener, SipSessionListener {
private static final long serialVersionUID = 1L;
private static transient Logger logger =
Logger.getLogger(ShootistSipServletAuth.class);
-
+ private static final String CONTENT_TYPE = "text/plain;charset=UTF-8";
/** Creates a new instance of ShootistSipServletAuth */
public ShootistSipServletAuth() {
@@ -123,7 +128,7 @@
// TODO Auto-generated catch block
e.printStackTrace();
}
-
if(!sipServletResponse.getHeader("CSeq").contains("10")) {
+
if(!sipServletResponse.getHeader("CSeq").contains((String)sipServletResponse.getApplicationSession().getAttribute("nbSubsequentReq")))
{
getServletContext().setAttribute("FirstResponseRecieved",
"false");
SipServletRequest register =
sipServletResponse.getSession().createRequest(sipServletResponse.getMethod());
register.send();
@@ -164,10 +169,16 @@
if(from == null) {
from = "BigGuy";
}
+
+ String numberOfSubsequentRequests =
ce.getServletContext().getInitParameter("nbSubsequentReq");
+ if(numberOfSubsequentRequests == null) {
+ numberOfSubsequentRequests = "10";
+ }
SipURI fromURI = sipFactory.createSipURI(from, "here.com");
SipURI toURI = sipFactory.createSipURI("LittleGuy",
"there.com");
SipServletRequest sipServletRequest =
sipFactory.createRequest(sipApplicationSession, method,
fromURI, toURI);
+ sipApplicationSession.setAttribute("nbSubsequentReq",
numberOfSubsequentRequests);
SipURI requestURI =
sipFactory.createSipURI("LittleGuy", "127.0.0.1:5080");
sipServletRequest.setRequestURI(requestURI);
try {
@@ -176,4 +187,60 @@
logger.error(e);
}
}
-}
+
+ public void sessionCreated(SipSessionEvent se) {
+ final SipSession sipSession = se.getSession();
+ Integer nbSessionCreated = (Integer)
sipSession.getAttribute("nbSessionCreated");
+ if(nbSessionCreated == null) {
+ sipSession.setAttribute("nbSessionCreated",
Integer.valueOf(1));
+ } else {
+ sipSession.setAttribute("nbSessionCreated",
Integer.valueOf(nbSessionCreated.intValue() + 1));
+ }
+ logger.info("number of sip sessions created " +
sipSession.getAttribute("nbSessionCreated") + " session " + sipSession);
+ SipFactory sipFactory =
(SipFactory)getServletContext().getAttribute(SIP_FACTORY);
+ if(nbSessionCreated != null && nbSessionCreated > 1) {
+ sendMessage(sipSession.getApplicationSession(), sipFactory, "" +
nbSessionCreated, null);
+ }
+ }
+
+ /**
+ * @param sipApplicationSession
+ * @param storedFactory
+ */
+ private void sendMessage(SipApplicationSession sipApplicationSession,
+ SipFactory storedFactory, String content, String
transport) {
+ try {
+ SipServletRequest sipServletRequest =
storedFactory.createRequest(
+ sipApplicationSession,
+ "MESSAGE",
+ "sip:[email protected]",
+ "sip:[email protected]");
+ sipServletRequest.addHeader("Ext", "Test 1, 2 ,3");
+ SipURI sipUri =
storedFactory.createSipURI("receiver", "127.0.0.1:5080");
+ if(transport != null) {
+
if(transport.equalsIgnoreCase(ListeningPoint.TCP)) {
+ sipUri = storedFactory.createSipURI("receiver",
"127.0.0.1:5081");
+ }
+ sipUri.setTransportParam(transport);
+ }
+ sipServletRequest.setRequestURI(sipUri);
+ sipServletRequest.setContentLength(content.length());
+ sipServletRequest.setContent(content, CONTENT_TYPE);
+ sipServletRequest.send();
+ } catch (ServletParseException e) {
+ logger.error("Exception occured while parsing the
addresses",e);
+ } catch (IOException e) {
+ logger.error("Exception occured while sending the
request",e);
+ }
+ }
+
+ public void sessionDestroyed(SipSessionEvent se) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void sessionReadyToInvalidate(SipSessionEvent se) {
+ // TODO Auto-generated method stub
+
+ }
+}
=======================================
---
/trunk/servers/sip-servlets/sip-servlets-test-suite/testsuite/src/test/java/org/mobicents/servlet/sip/testsuite/security/ShootistSipServletAuthTest.java
Thu Oct 28 13:12:24 2010
+++
/trunk/servers/sip-servlets/sip-servlets-test-suite/testsuite/src/test/java/org/mobicents/servlet/sip/testsuite/security/ShootistSipServletAuthTest.java
Fri Nov 26 06:48:23 2010
@@ -16,12 +16,15 @@
*/
package org.mobicents.servlet.sip.testsuite.security;
import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;
+import java.util.Map;
+import java.util.Map.Entry;
import javax.sip.SipProvider;
import javax.sip.header.Header;
-import javax.sip.header.ProxyAuthenticateHeader;
import javax.sip.header.ProxyAuthorizationHeader;
import javax.sip.message.Response;
@@ -59,17 +62,19 @@
"sip-test-context", "sip-test"));
}
- public SipStandardContext deployApplication(String name, String value) {
+ public SipStandardContext deployApplication(Map<String, String> params)
{
SipStandardContext context = new SipStandardContext();
context.setDocBase(projectHome
+ "/sip-servlets-test-suite/applications/shootist-sip-servlet-auth/src/main/sipapp");
context.setName("sip-test-context");
context.setPath("sip-test");
context.addLifecycleListener(new SipContextConfig());
context.setManager(new SipStandardManager());
- ApplicationParameter applicationParameter = new
ApplicationParameter();
- applicationParameter.setName(name);
- applicationParameter.setValue(value);
- context.addApplicationParameter(applicationParameter);
+ for (Entry<String, String> entry : params.entrySet()) {
+ ApplicationParameter applicationParameter = new
ApplicationParameter();
+ applicationParameter.setName(entry.getKey());
+ applicationParameter.setValue(entry.getValue());
+ context.addApplicationParameter(applicationParameter);
+ }
assertTrue(tomcat.deployContext(context));
return context;
}
@@ -128,7 +133,9 @@
receiverProtocolObjects.start();
tomcat.startTomcat();
- deployApplication("METHOD", "REGISTER");
+ Map<String, String> params = new HashMap<String, String>();
+ params.put("METHOD", "REGISTER");
+ deployApplication(params);
Thread.sleep(TIMEOUT);
ListIterator<Header> proxyAuthHeaders =
receiver.getRegisterReceived().getHeaders(ProxyAuthorizationHeader.NAME);
int proxyAuthHeaderNumber = 0;
@@ -163,7 +170,9 @@
receiverProtocolObjects.start();
tomcat.startTomcat();
- deployApplication("from", "cancelChallenge");
+ Map<String, String> params = new HashMap<String, String>();
+ params.put("from", "cancelChallenge");
+ deployApplication(params);
Thread.sleep(TIMEOUT);
assertTrue(receiver.isCancelReceived());
}
@@ -192,7 +201,9 @@
receiverProtocolObjects.start();
tomcat.startTomcat();
- deployApplication("from", "cancelChallengeBefore1xx");
+ Map<String, String> params = new HashMap<String, String>();
+ params.put("from", "cancelChallengeBefore1xx");
+ deployApplication(params);
Thread.sleep(TIMEOUT);
assertTrue(receiver.isCancelReceived());
}
@@ -220,7 +231,9 @@
receiverProtocolObjects.start();
tomcat.startTomcat();
- deployApplication("from", "reinvite");
+ Map<String, String> params = new HashMap<String, String>();
+ params.put("from", "reinvite");
+ deployApplication(params);
Thread.sleep(TIMEOUT);
assertTrue(receiver.isAckReceived());
receiver.setWaitForCancel(true);
@@ -229,6 +242,38 @@
Thread.sleep(TIMEOUT);
assertTrue(receiver.isCancelReceived());
}
+
+ /*
+ * Non regression test for Issue 2116
+ * http://code.google.com/p/mobicents/issues/detail?id=2116
+ * Making sure no derived sessions are created
+ */
+ public void testShootistReREGISTER() throws Exception {
+ receiverProtocolObjects =new ProtocolObjects(
+ "reregister", "gov.nist", TRANSPORT,
AUTODIALOG, null, null, null);
+
+ receiver = new TestSipListener(5080, 5070, receiverProtocolObjects,
false);
+ receiver.setChallengeRequests(true);
+ receiver.setMultipleChallengeInResponse(true);
+ SipProvider receiverProvider = receiver.createProvider();
+ receiverProvider.addSipListener(receiver);
+ receiverProtocolObjects.start();
+
+ tomcat.startTomcat();
+ Map<String, String> params = new HashMap<String, String>();
+ params.put("METHOD", "REGISTER");
+ params.put("from", "reregister");
+ params.put("nbSubsequentReq", "4");
+ deployApplication(params);
+
+ Thread.sleep(TIMEOUT);
+ Iterator<String> allMessagesIterator =
receiver.getAllMessagesContent().iterator();
+ while (allMessagesIterator.hasNext()) {
+ String message = (String) allMessagesIterator.next();
+ logger.info(message);
+ }
+ assertEquals(0, receiver.getAllMessagesContent().size());
+ }
@Override
protected void tearDown() throws Exception {