[api] adapt unit tests