Refactor alarm tests to use a test harness

This improves the test writing experience for tests that rely on alarm code.
4 files changed