behave: helpers: ported some methods from aipom and unittest