This recent question prompted me to answer the OP because the question actually involved a decent unit test (although, it needs some tweaking), the code itself was impossible to test. I don't think we actually have a canonical question that covers how to fix code of that nature. The canonical question linked there suggests that you need more tests. More tests won't help, you actually need to fix the code.
If you're going to close/duplicate a question, make sure the linked question actually answers the question instead of blindly closing. If we need more canonical questions, we can address that separately, but we need to try to be helpful with all of our responses, even our duplicate/close reasons.
Can we please be a better community, and think before we act?