Update unit test.

Update event processing implementation.
Add unit test for event queueing.

Refers to issue #4