I made a little class that validates its constructor arguments and throws informative exceptions when it doesn't like them. My unit tests went nicely enough but now I'm building the thing with reflection by invoking the Constructor. The validation exceptions cause an invocation exception which is not informative at all. I'm betting there's no easy fix here, right?
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
CotnractualJ mandates that all constructors throw UnsupportedOperationException always. It also mandates 100% code coverage during test. It follows then that it contains test cases that invoke these constructors with passing test cases. In fact, *every* test case contains this test.