payment: add tests for DirectPaymentAutomatonDAOHelper

Simplify a bit the code as well.

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