Bug 8836: (RM followup) unit tests should use the new API

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>