DummyDispatcher dispatcher = ((DummyDispatcher)manager.getDispatcher());
assertEquals("starts with no instances", 0, manager.getProcessorCount());
MessageOne message1 = new MessageOne(123);
InstanceWrapper wrapper1 = manager.getInstanceForDispatch(message1);
manager.dispatch(message1, false);
CombinedMP instance = (CombinedMP)wrapper1.getInstance();
assertEquals("instance was created", 1, manager.getProcessorCount());
assertEquals("instance activated", 1, instance.activationCount);
assertTrue("real activation time", instance.activationTime > 0);
assertSame("instance received message", message1, instance.messages.get(0));
assertEquals("message count", 1, instance.messages.size());
assertTrue("activated before first message", instance.activationTime < instance.firstMessageTime);
assertEquals("MessageOne",dispatcher.lastDispatched);
MessageOne message2 = new MessageOne(123);
InstanceWrapper wrapper2 = manager.getInstanceForDispatch(message2);
manager.dispatch(message2, false);
assertSame("same wrapper returned for second message", wrapper1, wrapper2);
assertEquals("no other instance was created", 1, manager.getProcessorCount());
assertEquals("no second activation", 1, instance.activationCount);