entitlement: fix for TestApiListener when using an in-memory bus

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>