Add WithFlags tests