src: Factorize unit tests code by using a new static struct 'methods'