gen_test: fix for original dev env. again, smaller code pieces for test