test: use public API instead of internal API