assertEquals(1, myDispatcher.getPendingMessages(myUser).length);
}
public void testPersistency() throws Exception {
Message failedMessage = new P2PNetworkMessage("foo", "foo2", new String[]{"test"});
myDispatcher.performDispatch(myUser, failedMessage);
myDispatcher.save();
AbstractMessageDispatcher dispatcher = createDispatcher();
assertEquals("queue should persist", 1, dispatcher.getPendingMessages(myUser).length);
Message message = dispatcher.getPendingMessages(myUser)[0];
assertTrue("queue should persist", message instanceof P2PNetworkMessage);
assertEquals("test", ((P2PNetworkMessage) message).getParameters()[0]);
dispatcher.dispose();
}