The State of Michigan thrust something like this upon me years ago.
When the AIDS epidemic really got rolling (and in a supreme effort to try and hide the fact that 99% of its victims were gay men), the State in it’s wisdom decreed that all of us hetero couples about to be married must attend a three-hour public health lecture on AIDS prevention.
I learned how to protect myself doing activities I never would have thought of in a million years, had it not been for the generosity of the taxpayers of Michigan.
I would have refused to go, and if they refused to issue a marriage license taken it to court. The gov’t should never have been allowed to get into the marriage business, other than settling property disputes upon divorce or death.