*/
public void testLIFO() throws AMQException, ConfigurationException
{
assertTrue("Unexpected actor: " + CurrentActor.get(), CurrentActor.get() instanceof TestLogActor);
AMQPConnectionActor connectionActor = new AMQPConnectionActor(getSession(),
new NullRootMessageLogger());
/*
* Push the actor on to the stack:
*
* CurrentActor -> Connection
* Stack -> null
*/
CurrentActor.set(connectionActor);
//Use the Actor to send a simple message
sendTestLogMessage(CurrentActor.get());
// Verify it was the same actor as we set earlier
assertEquals("Retrieved actor is not as expected ",
connectionActor, CurrentActor.get());
/**
* Set the actor to now be the Channel actor so testing the ability
* to push the actor on to the stack:
*
* CurrentActor -> Channel
* Stack -> Connection, null
*
*/
AMQChannel channel = new AMQChannel(getSession(), 1, getSession().getVirtualHost().getMessageStore());
AMQPChannelActor channelActor = new AMQPChannelActor(channel,
new NullRootMessageLogger());
CurrentActor.set(channelActor);
//Use the Actor to send a simple message
sendTestLogMessage(CurrentActor.get());