Maybe factorize the testRule by a 'generic' rule which take the flags as parameter...