Refactor the online test cases to be a bit more DRY.