api: fix unit test