Tests: Use the new API (+ Fix abstract_th ...)

Signed-off-by: Jerome Flesch <jflesch@gmail.com>