Fix unittest for api

Signed-off-by: Thanh Ha <thanh.ha@alumni.carleton.ca>