add testcases for error implementation