test: split success case and error case