This is guaranteed by getScheduledTaskDefinition(), the assertion has been moved to shouldGetScheduledTaskDefinition(). I have refactored common setup into helper methods and provided unit tests for the helper methods.