TEST_F(GroupVerifierTest, TestRequiresAllBadFormat) {
  TestUtility::loadFromYaml(RequiresAllConfig, proto_config_);
  createAsyncMockAuthsAndVerifier(std::vector<std::string>{"example_provider", "other_provider"});

  // onComplete with failure status, not payload
  EXPECT_CALL(mock_cb_, setPayload(_)).Times(0);
  EXPECT_CALL(mock_cb_, onComplete(Status::JwtBadFormat));
  auto headers = Http::TestRequestHeaderMapImpl{
      {"example-auth-userinfo", ""},
      {"other-auth-userinfo", ""},
  };
  context_ = Verifier::createContext(headers, parent_span_, &mock_cb_);
  verifier_->verify(context_);
  callbacks_["example_provider"](Status::JwtBadFormat);
  // can keep invoking callback
  callbacks_["other_provider"](Status::Ok);
  callbacks_["example_provider"](Status::Ok);
  callbacks_["other_provider"](Status::Ok);
  EXPECT_FALSE(headers.has("example-auth-userinfo"));
  EXPECT_FALSE(headers.has("other-auth-userinfo"));
}
TEST_F(GroupVerifierTest, TestRequiresAllBadFormat) {
  TestUtility::loadFromYaml(RequiresAllConfig, proto_config_);
  createAsyncMockAuthsAndVerifier(std::vector<std::string>{"example_provider", "other_provider"});

   
  EXPECT_CALL(mock_cb_, setPayload(_)).Times(0);
  EXPECT_CALL(mock_cb_, onComplete(Status::JwtBadFormat));
  auto headers = Http::TestRequestHeaderMapImpl{
      {"example-auth-userinfo", ""},
      {"other-auth-userinfo", ""},
  };
  context_ = Verifier::createContext(headers, parent_span_, &mock_cb_);
  verifier_->verify(context_);
  callbacks_["example_provider"](Status::JwtBadFormat);
   
  callbacks_["other_provider"](Status::Ok);
  callbacks_["example_provider"](Status::Ok);
  callbacks_["other_provider"](Status::Ok);
  EXPECT_FALSE(headers.has("example-auth-userinfo"));
  EXPECT_FALSE(headers.has("other-auth-userinfo"));
}