Fix unit Testing for invalid sql