flag unit test