Add assert if error to test case.