Refactor unittest to be used in other module

When adding new SEPA flavor, we should be able to reuse this unittest for the
new flavor.

issue4376
review6691003