Difference is that in your unit test you call session.signalEvent and in console signalEvent is done on process instance instead. So that would be why unit test work and in console it does not. I would give a try to change unit test to use process instance signalEvent to keep it consistent. Let us know if that works, as Tihomir said then we could try to look at CommandDelegate if there is anything that could cause any issues.
HTH