entitlement: add checks before and after each test

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