Add API mock test.