Add unit tests for timer