Extract an interface for alarm manager.
Added mock implementation for alarm manager.