Updated the tests to use theories, refactored the ProcessEventsJob