test: rewrite FlagsTest for data driven testing