The most useless unit test ever
This is an actual unit test I ran into today.. I've made minor modifications to the code just to make it appear less like taken straight out of some application (although it is) and perhaps make it more fun to read.. but other than that.. the test is exactly as I found it...
So what's wrong with it? If you have to ask you'll never understand... or at least not before you program for a few more years, go off.. code something.
But it has comments! Yes.. yes it does. A lot of them and every single one utterly useless.
How did I run into this gem? It continuously fails on my daily unit test run, I finally decided to investigate why.. and well, the reason is obvious. It checks for a hardcoded value that was likely deleted long time ago.. as you know, test databases get wiped on regular basis and stuff.
It's obviously not finished! You say.. actually hasn't been touched in ages in an actively developed project.. so I have to assume it is meant to be this way.
Why am I not posting this to daily wtf? I'm not sure it's actually submission worthy.. It's just well.. so.. oh well, that, er, yah.
So what does it actually test? As far as I can tell.. JDBC works like a charm, good job Sun!