Add scheduler unit tests to enable bug fixes and refactoring

Improves the coverage for DVR scheduling and will allow safer bug
fixes and refactoring in follow-on patches.

Change-Id: I02d0126e31adcab88a7ee82ba1cb76f952c9a68c
Partial-bug: #1353266
Partial-bug: #1356639
Co-Authored-By: Swaminathan Vasudevan <swaminathan.vasudevan@hp.com>
Throw exception instances instead of classes

Prefer single style of throwing instances and not classes.

Change-Id: If159afcd092de5381309cbe217d64145ed5b45b4
Closes-Bug: #1364392
Merge "Add scheduler unit tests to enable bug fixes and refactoring"
Merge "Throw exception instances instead of classes"