api: fixed unit-test