Added events tests and code.